This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115f. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-06
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.
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
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.