[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly

2014-04-27 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978 --- Comment #5 from Manuel López-Ibáñez --- I think it should not warn for anonymous enums. The point of the warning is that using different enum types in a conditional expression is often some programming mistake. But in the case of anonymous enu

[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly

2014-04-27 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978 --- Comment #4 from Manuel López-Ibáñez --- (In reply to Manuel López-Ibáñez from comment #3) > I don't even understand what this code is trying to warn about: > > if (TREE_CODE (arg2_type) == ENUMERAL_TYPE > && TREE_CODE (arg3_type

[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly

2014-04-27 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comment

[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly

2014-04-27 Thread ppluzhnikov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978 --- Comment #2 from Paul Pluzhnikov --- (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 expr

[Bug c++/60978] [4.9 Regression] -Wenum-compare warns too eagerly

2014-04-27 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60978 --- Comment #1 from Andrew Pinski --- 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 enable