This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29018] empty enum accepted



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]