This is the mail archive of the gcc-bugs@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]

[Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712

--- Comment #13 from Jonathan Nieder <jrnieder at gmail dot com> 2012-10-16 07:55:56 UTC ---
Hi Kyrill,

(In reply to comment #11)
> Adding the -fno-short-enums fixes the
> extra warning generated by the arg >= 0 comparison in pr51712.c
> 
> "warning: comparison is always true due to limited range of data type
> [-Wtype-limits]
>   return arg >= 0 && arg <= BAR;"

If the -fno-short-enums option is needed here, isn't that a bug?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]