Hi,
On 06/04/2012 06:55 PM, Jason Merrill wrote:
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.
Ok, this would be simple to do. The only issue I can see, is that in C++
-Wenum-compare has a name, thus can be easily disabled but it's ON by
default. Anyway, I'll send a patchlet should be just a couple of lines
in call.c + a few words in the doc.
Paolo.