[cfe-dev] Rejecting "void f(const void);"?
Eric Christopher
echristo at apple.com
Fri Feb 15 02:04:02 PST 2008
On Feb 15, 2008, at 12:33 AM, 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?
FWIW I agree, I can't see any reason to reject this admittedly useless
type qualifier. While void isn't a valid lvalue, from my reading it just
means that the const is useless - not incorrect.
Someone could conceivably raise it on the C reflector though.
-eric
More information about the cfe-dev
mailing list