This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33101] [DR 577] allow typedefs for void in empty parameter list
- From: "Keith.S.Thompson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Mar 2012 21:41:18 +0000
- Subject: [Bug c++/33101] [DR 577] allow typedefs for void in empty parameter list
- Auto-submitted: auto-generated
- References: <bug-33101-4@http.gcc.gnu.org/bugzilla/>
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 "()".)