public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38470]  New: Feature request: smarter signed/unsigned warning
@ 2008-12-10 10:35 m dot j dot thayer at googlemail dot com
  2010-02-24 14:11 ` [Bug c/38470] value range propagation (VRP) would improve -Wsign-compare manu at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: m dot j dot thayer at googlemail dot com @ 2008-12-10 10:35 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-06-28 15:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38470-4@http.gcc.gnu.org/bugzilla/>
2011-06-15 18:16 ` [Bug c/38470] value range propagation (VRP) would improve -Wsign-compare manu at gcc dot gnu.org
2012-03-24  7:50 ` DeusExSophismata at gmail dot com
2012-04-16 10:44 ` manu at gcc dot gnu.org
2013-05-20 13:23 ` paolo.carlini at oracle dot com
2015-01-07 11:11 ` manu at gcc dot gnu.org
2015-06-22 10:41 ` manu at gcc dot gnu.org
2020-05-06  8:45 ` kretz at kde dot org
2020-05-06  8:46 ` kretz at kde dot org
2020-11-03  4:14 ` egallager at gcc dot gnu.org
2021-06-28 13:01 ` inkerman42 at gmail dot com
2021-06-28 13:51 ` mkretz at gcc dot gnu.org
2021-06-28 14:13 ` vincent-gcc at vinc17 dot net
2021-06-28 14:30 ` mkretz at gcc dot gnu.org
2021-06-28 14:53 ` vincent-gcc at vinc17 dot net
2021-06-28 15:07 ` mkretz at gcc dot gnu.org
2021-06-28 15:33 ` vincent-gcc at vinc17 dot net
2008-12-10 10:35 [Bug c/38470] New: Feature request: smarter signed/unsigned warning m dot j dot thayer at googlemail dot com
2010-02-24 14:11 ` [Bug c/38470] value range propagation (VRP) would improve -Wsign-compare manu at gcc dot gnu dot org
2010-02-24 14:13 ` manu at gcc dot gnu dot org
2010-02-24 14:17 ` m dot j dot thayer at googlemail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).