Created on 2021-02-25.00:00:00 last changed 22 months ago
CWG 2023-02-07
Additional drafting is needed to address references to decl-specifier-seq in other parts of the standard. A list is here. Furthermore, reducing the grammar to a type-specifier-seq appears to be sufficient.
Proposed resolution (November, 2022):
Change in 9.2.2 [dcl.stc] paragraph 4 as follows:
There can be no static function declarations within a block, nor any static function parameters.
Change in 9.2.2 [dcl.stc] paragraph 5 as follows:
The extern specifier shall not be used in the declaration of a class memberor function parameter.
Change in 9.2.4 [dcl.typedef] paragraph 1 as follows:
The typedef specifier shall not be combined in a decl-specifier-seq with any other kind of specifier except a defining-type-specifier, and it shall not be usedin the decl-specifier-seq of a parameter-declaration (9.3.4.6 [dcl.fct]) norin the decl-specifier-seq of a function-definition (9.5 [dcl.fct.def]).
Change in 9.2.8 [dcl.inline] paragraph 4 as follows:
The inline specifier shall not appear on a block scope declarationor on the declaration of a function parameter.
Change in 9.3.4.6 [dcl.fct] paragraph 3 as follows:
parameter-declaration: attribute-specifier-seqopt thisoptdecl-specifier-seqdefining-type-specifier-seq declarator attribute-specifier-seqopt thisoptdecl-specifier-seqdefining-type-specifier-seq declarator = initializer-clause attribute-specifier-seqopt thisoptdecl-specifier-seqdefining-type-specifier-seq abstract-declaratoropt attribute-specifier-seqopt thisoptdecl-specifier-seqdefining-type-specifier-seq abstract-declaratoropt = initializer-clause
9.3.4.6 [dcl.fct] paragraph 3 specifies the grammar for parameter-declaration:
parameter-declaration: attribute-specifier-seqopt thisopt decl-specifier-seq declarator attribute-specifier-seqopt thisopt decl-specifier-seq declarator = initializer-clause attribute-specifier-seqopt thisopt decl-specifier-seq abstract-declaratoropt attribute-specifier-seqopt thisopt decl-specifier-seq abstract-declaratoropt = initializer-clause
This is overly permissive; using a defining-type-specifier-seq instead of a decl-specifier-seq is sufficient.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-02-10 14:41:48 | admin | set | messages: + msg7189 |
2023-02-06 20:47:07 | admin | set | status: tentatively ready -> drafting |
2022-11-20 07:54:16 | admin | set | status: open -> tentatively ready |
2022-02-18 07:47:23 | admin | set | messages: + msg6742 |
2021-02-25 00:00:00 | admin | create |