This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Accepted as a DR at the November, 2022 meeting.]
Subclause 9.3.3 [dcl.ambig.res] paragraph 1 specifies:
The ambiguity arising from the similarity between a function-stylecast and a declaration mentioned in 8.11 [stmt.ambig] can alsooccur in the context of a declaration. In that context, the choice isbetween a function declaration with a redundant set of parenthesesaround a parameter name and an object declaration with afunction-style cast as the initializer. Just as for the ambiguitiesmentioned in 8.11 [stmt.ambig], the resolution is to considerany construct that could possibly be a declaration a declaration.
The specification correctly describes an ambiguity between afunction declaration and an object declaration, but resolves theambiguity to a "declaration", which does not offer any insight.
Proposed resolution (2022-09-09) [SUPERSEDED]:
Change in 9.3.3 [dcl.ambig.res] paragraph 1 as follows:
...Just as for the ambiguities mentioned in8.11 [stmt.ambig], theThe resolution is toconsider any construct that could possibly be afunctiondeclaration afunction declaration.
Proposed resolution (approved by CWG 2022-09-23):
Change in 9.3.3 [dcl.ambig.res] paragraph 1 as follows:
The ambiguity arising from the similarity between a function-stylecast and a declaration mentioned in 8.11 [stmt.ambig] can alsooccur in the context of a declaration. In that context, the choice isbetweena function declaration with a redundant set of parentheses arounda parameter name andan object declaration with a function-stylecast as the initializerand a declaration involving a function declarator with aredundant set of parentheses around a parameter name. Just asfor the ambiguities mentioned in 8.11 [stmt.ambig], theresolution is to consider any construct, such as the potentialparameter declaration, that could possibly be adeclarationto be a declaration.