[cfe-dev] Rejecting "void f(const void);"?

Neil Booth neil at daikokuya.co.uk
Fri Feb 15 05:25:39 PST 2008


Eli Friedman wrote:-

> In all of clang, gcc, and comeau, some sort of error is given for a
> declaration like "void f(const void);".  However, as far as I can
> tell, it's perfectly valid code (although mostly worthless, since the
> declared function can't be called or defined).  Is there some reason
> for rejecting this that I'm missing?

See http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_017.html,
part 14.  Intent seems to be to give implementations license to reject.

Neil.



More information about the cfe-dev mailing list