[Bug c++/54216] Missing diagnostic for ill-formed anonymous enum declarations
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 10 00:41:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54216
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-04-10 00:41:06 UTC ---
Hi Jason. I'm working on this and the patch is trivial but I suspect that quite
a few testcases (in the library too) need adjusting. Thus, before I start to do
that, wanted to ask: is it Ok a pedwarn for the first case:
enum {}; //-std=c++98 or -std=c++11
and an hard error for the other two:
enum class {}; //-std=c++11
enum class { x }; //-std=c++11
? Like:
54216.C:1:6: warning: anonymous enumeration may not be empty [-Wpedantic]
enum {}; //-std=c++98 or -std=c++11
^
54216.C:3:12: error: scoped enumeration without a name
enum class {}; //-std=c++11
^
54216.C:5:12: error: scoped enumeration without a name
enum class { x }; //-std=c++11
^
More information about the Gcc-bugs
mailing list