Greg Troxel <[email protected]> writes:
> I wonder if it's a gcc bug that 'sizeof (void *) 0' fails.
My understanding of Section A.2.1 of C99 is that both this and
"sizeof ((void *) 0)" are syntactically invalid:
(6.5.1) primary-expression:
identifier
constant
string-literal
( expression )
(6.5.2) postfix-expression:
primary-expression
postfix-expression [ expression ]
postfix-expression ( argument-expression-listopt )
postfix-expression . identifier
postfix-expression -> identifier
postfix-expression ++
postfix-expression --
( type-name ) { initializer-list }
( type-name ) { initializer-list , }
[...]
(6.5.3) unary-expression:
postfix-expression
++ unary-expression
-- unary-expression
unary-operator cast-expression
sizeof unary-expression
sizeof ( type-name )
(6.5.3) unary-operator: one of
& * + - ~ !
(6.5.4) cast-expression:
unary-expression
( type-name ) cast-expression
Do you have pointers to the discussions you've had with the Gnulib and
NetBSD people?
Thanks,
Ludo'.