[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 pinskia at gcc dot gnu.org --- 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

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

[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 manu at gcc dot gnu.org changed: What|Removed |Added CC||manu at gcc

[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 manu at gcc dot gnu.org --- (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

[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 manu at gcc dot gnu.org --- 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