This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness
- From: "jrnieder at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Oct 2012 07:55:56 +0000
- Subject: [Bug c/51712] -Wtype-limits should not trigger for types of implementation-defined signedness
- Auto-submitted: auto-generated
- References: <bug-51712-4@http.gcc.gnu.org/bugzilla/>
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?