This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29018] empty enum accepted
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2007 17:47:06 -0000
- Subject: [Bug c++/29018] empty enum accepted
- References: <bug-29018-5394@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pcarlini at suse dot de 2007-09-04 17:47 -------
Hummm, with reference to the patch in Comment #9: I don't think 'enum { };' is
flagged in the standard as ill-formed because of the empty enumerator-list
(that possibility is explicitly discussed in 7.2/5), but because the enum
doesn't have a name. In other terms, the example is ill-formed for the very
same reason anonymous structs are a GNU extension. In yet other terms, it seems
to me we have got an anonymous enum extension, which probably we want to
diagnose when pedantic.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29018