Title
Contradictory optionality in simple-declaration
Status
nad
Section
9.1 [dcl.pre]
Submitter
Gabriel Dos Reis

Created on 2016-07-12.00:00:00 last changed 83 months ago

Messages

Date: 2017-04-15.00:00:00

Rationale (April, 2017):

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

Date: 2022-11-20.07:54:16

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.

History
Date User Action Args
2018-02-27 00:00:00adminsetmessages: + msg6013
2016-07-12 00:00:00admincreate