[Bug c++/33101] [DR 577] allow typedefs for void in empty parameter list

Keith.S.Thompson at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 16 21:47:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33101

--- Comment #14 from Keith Thompson <Keith.S.Thompson at gmail dot com> 2012-03-16 21:41:18 UTC ---
On re-reading DR 577, I agree that it implies the current standard
says that only "(void)" is allowed, and in particular that a typedef
is not.  I might have interpreted it differently myself, but I defer to
the committee.  (I thought perhaps that the change had been made between
N3290 and the released standard, but apparently that's not the case.)

The fact that C90 required the keyword further weakens my previous
argument.

So the diagnostic is necessary, but I'd still suggest that a warning
would be more appropriate, and would still meet the current standard's
requirements.

(I should mention that I have no need for this myself; I don't even take
advantage of the permission to use "(void)" rather than "()".)



More information about the Gcc-bugs mailing list