This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/38470] New: Feature request: smarter signed/unsigned warning
- From: "m dot j dot thayer at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2008 10:34:29 -0000
- Subject: [Bug c/38470] New: Feature request: smarter signed/unsigned warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is a request to drop the signed/unsigned comparison warning if the
compiler can clearly see that the unsigned value is positive. E.g. in the
following case:
if (foo >= 0 && foo < sizeof(bar)) ...
This would avoid the need for a typecase. Please correct me if this is still
not safe for other reasons.
--
Summary: Feature request: smarter signed/unsigned warning
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot j dot thayer at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470