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 the case of anonymous enums, they are probably just
used as named constants, so there is no much point in warning.

The reason it does not warn in C is that this particular warning message is not
implemented in C. Perhaps it should be.

The manual is a bit confusing. It would read better as:

Warn about a comparison between values of different enumerated types. In C this
warning is enabled by -Wall.  In C++ the warning is enabled by default and it
warns also about enumeral mismatches in conditional expressions.

Reply via email to