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

2024-11-11


2288. Contradictory optionality in simple-declaration

Section: 9.1  [dcl.pre]     Status: NAD     Submitter: Gabriel Dos Reis     Date: 2016-07-12

Subclause 9.1 [dcl.pre] paragraph 1 defines simple-declaration as:

simple-declaration :
    decl-specifier-seq init-declarator-listopt ;
    attribute-specifier-seq decl-specifier-seq init-declarator-list ;
    ...

However, 9.1 [dcl.pre] paragraph 2 then refers to a simple-declaration using a different producction:

A simple-declaration or nodeclspec-function-declaration of the form
    attribute-specifier-seqopt decl-specifier-seqopt init-declarator-listopt ;
is divided into three parts...

It appears that the latter redefines the grammar non-terminal simple-declaration in an inconsistent way.

Rationale (April, 2017):

The unification of the “in the form” pattern is confusing, so the question was based on a misunderstanding of the text.