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/38470] New: Feature request: smarter signed/unsigned warning


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


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