This issue has been automatically converted from the original issue lists and some formatting may not have been preserved.
Authors: The Open Group, Andrew Josey via Fred Tydeman
Date: 2003-08-15
Reference document: Open Group aardvark 117
Submitted against: C99
Status: Fixed
Fixed in: C99 TC3
Cross-references: 1002
Converted from: summary-c99.htm, dr_289.htm
6.7.6 (direct-abstract-declarator) is inconsistent with 6.7.5 (direct-declarator) with respect to omitting an identifier from a declaration to form a type name.
Here is a specific example that shows the problem.
int lio_listio(int, struct aiocb *restrict const[restrict]);
is invalid and appears to have to be done as:
int lio_listio(int, struct aiocb *restrict const __FOO[restrict]);
6.7.6 Type names, paragraph 2 has:
In several contexts, it is necessary to specify a type. This is accomplished using a type name, which is syntactically a declaration for a function or an object of that type that omits the identifier.
So you would think that if
struct aiocb *restrict const __FOO[restrict]
is a valid declaration of the object __FOO
, then it should follow from the
above statement that
struct aiocb *restrict const [restrict]
must be a valid type name.
Comment from WG14 on 2004-03-03:
In the syntax rules for direct-abstract-declarator in 6.7.6 paragraph 1, replace
direct-abstract-declaratoropt
[
assignment-expressionopt]
with
direct-abstract-declaratoropt
[
type-qualifier-listopt assignment-expressionopt]
direct-abstract-declaratoropt
[ static
type-qualifier-listopt assignment-expression]
direct-abstract-declaratoropt
[
type-qualifier-liststatic
assignment-expression]