CWG Issue 2249 (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
2249._identifier_s and _id-expression_s
Section: 7.5.5.2 [expr.prim.id.unqual]Status: CD5Submitter: Robert HaberlachDate: 2016-03-17
[Accepted as a DR at the June, 2018 (Rapperswil) meeting.]
According to 7.5.5.2 [expr.prim.id.unqual] paragraph 1,
An identifier is an id-expression provided it has been suitably declared (Clause 9 [dcl]).
Not only is an identifier an id-expression by (grammatical) definition, declarator-id is defined in terms of_id-expression_, which makes this circular. If the intention was to disallow use of undeclared identifiers as primary expressions, this should be altered accordingly.
Proposed resolution, February, 2018:
Change 7.5.5.2 [expr.prim.id.unqual] paragraph 1 as follows:
An identifier is only an id-expression
providedif it has been suitably declared ( Clause 9 [dcl]) or if it appears as part of a_declarator-id_ (9.3 [dcl.decl]). [_Note:_For _operator-function-id_s, see...