This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 05/31/2012 10:55 AM, Paolo Carlini wrote: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.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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |