[Bug c++/33101] [DR 577] Bad C++ error on invalid code: <anonymous> has incomplete type

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 16 20:39:00 GMT 2012


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bad C++ error on invalid    |[DR 577] Bad C++ error on
                   |code: <anonymous> has       |invalid code: <anonymous>
                   |incomplete type             |has incomplete type

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-16 20:17:02 UTC ---
(In reply to comment #10)
> I believe that the resolution of DR 577:
>     http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#577
> confirms this.  The resolution, as of August, 2011, suggests changing
> the wording to refer to the *type* void rather than the keyword.  
> (That change doesn't appear in the N3270 draft; I don't know whether
> it appears in the final ISO C++ 2011 standard.)

It doesn't, the DR says [Voted into the WP at the February, 2012 meeting.]
i.e. after the 2011 standard.

> At the very least, since there is (unfortunately) real-world code that 
> depends on this, I suggest changing it from a fatal error to a warning,
> though I think removing the diagnostic altogether would be better.

Since GCC, Clang and EDG all reject it today I'm surprised such real-world code
hasn't been changed already.



More information about the Gcc-bugs mailing list