Submitter: Joseph Myers (UK)
Submission Date: 2007-03-24
Source: Joseph Myers <email@example.com>
Reference Document: ISO/IEC WG14 N1222
[*] in abstract declarators
188.8.131.52#4 says that
* as an array size "can only be
used in declarations with function prototype scope", and paragraph 5
says "If the size is an expression that is not an integer constant
expression: if it occurs in a declaration at function prototype scope,
it is treated as if it were replaced by
But is a type name in a function prototype a declaration, and does
it have function prototype scope? Scopes are only defined in 6.2.1
for identifiers, and such type names do not declare identifiers. The
[*] in the syntax for abstract declarators
void f(int (*)[*]);
was intended to be valid and
void f(int (*)[a]); was
intended to be equivalent to it, but there are no declarations at
function prototype scope involved.
Similiarly, what is "in" such a declaration? Is the following valid?
void f(int (*)[sizeof(int (*)[*])]);
[*] lies within a parameter declaration,
it's within an expression inside it; not one of the declarators
involved in declaring the identifier with function prototype scope.
Suggested Technical Corrigendum
184.108.40.206 paragraph 4, change "declarations with function prototype scope" to "the nested sequence of declarators or abstract declarators for a function parameter in a function declaration that is not a definition"; remove the footnote. Paragraph 5, change "declaration at function prototype scope" to "the nested sequence of declarators or abstract declarators for a function parameter in a function declaration that is not a definition".
Previous Defect Report < - > Next Defect Report