On 05/31/2012 10:55 AM, Paolo Carlini wrote:
On 05/31/2012 04:43 PM, Jason Merrill wrote:
Does the C front end warn about this mismatch?
I just tried the first test of g++.old-deja/g++.other/cond5.C and the C
front-end does *not* warn neither by default, neither with -Wall.
  Do we warn about mismatch in comparisons?
Comparisons are dealt with separately, we have -Wenum-compare:

It seems to me that these should be covered by the same flag. Maybe just add the warning to -Wenum-compare to start with; this isn't exactly comparison, but it's another case of the usual arithmetic conversions bringing them to a common type. For 4.8 I think we also want to improve our handling of use of enums within their enum-specifier.

Jason

Reply via email to