CWG Issue 254 (original) (raw)

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-04-13


254. Definitional problems with _elaborated-type-specifier_s

Section: 6.5.6 [basic.lookup.elab]Status: CD1Submitter: Clark NelsonDate: 26 Oct 2000

[Voted into WP at April 2003 meeting.]

  1. The text in 6.5.6 [basic.lookup.elab] paragraph 2 twice refers to the possibility that an _elaborated-type-specifier_might have the form
    class-key identifier ;

However, the grammar for elaborated-type-specifier does not include a semicolon. 2. In both 6.5.6 [basic.lookup.elab] and 9.2.9.5 [dcl.type.elab], the text asserts that an_elaborated-type-specifier_ that refers to a typedef-name_is ill-formed. However, it is permissible for the form of_elaborated-type-specifier that begins with typenameto refer to a typedef-name.
This problem is the result of adding the typename form to the elaborated-type-name grammar without changing the verbiage correspondingly. It could be fixed either by updating the verbiage or by moving the typename syntax into its own production and referring to both nonterminals when needed.

(See also issue 180. If this issue is resolved in favor of a separate nonterminal in the grammar for the typename forms, the wording in that issue's resolution must be changed accordingly.)

Notes from 04/01 meeting:

The consensus was in favor of moving the typenameforms out of the elaborated-type-specifier grammar.

Notes from the 4/02 meeting:

This will be consolidated with the changes forissue 245.

Proposed resolution (October 2002):

As given in N1376=02-0034.