https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52763
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to eldnumh from comment #6) > In the documentation of GCC 4.6.3 > https://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html#index- > Wextra-249 > > as well as in the current one > https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Warning-Options.html#index- > Wextra-285 > > it is written, that -Wextra enables this kind of warnings: > "The option -Wextra also prints warning messages for the following cases: > ... > (C++ only) An enumerator and a non-enumerator both appear in a > conditional expression. " That is for cases such as: enum a { A = -1 }; int foo(int cond, unsigned int value) { return cond ? A : value; } which are different.