This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly
- From: "ppluzhnikov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 27 Apr 2014 22:19:55 +0000
- Subject: [Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly
- Auto-submitted: auto-generated
- References: <bug-60978-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978
--- Comment #2 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
(In reply to Andrew Pinski from comment #1)
> This is documented to do this even in 4.8
> (http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Warning-Options.html):
> In C++ enumeral mismatches in conditional expressions are also diagnosed
> and the warning is enabled by default.
It also says "In C this warning is enabled by -Wall", but in fact "gcc -Wall"
does NOT warn.
In any case, warning when two *anonymous* enums are used like they are here to
return an integer seems of no value whatsoever.