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/63445] request: make -Wstrict-overflow avoid a class of false positives


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63445

Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-10-03
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
I'm going to confirm this even if it is not clear it is possible to fix this.

Also, I think it is a bug that the loop condition has the location of the "for"
keyword and not of the "<" expression when lowering to gimple. That is,

 [test.c : 8:7] if (iD.1622 < nD.1621) goto <D.1623>; else goto <D.1625>; 

should be

 [test.c : 8:33] if (iD.1622 < nD.1621) goto <D.1623>; else goto <D.1625>; 

It gets even more confusing if the "i < n" is in the next line:

test.c:8:7: warning: assuming signed overflow does not occur when simplifying
conditional [-Wstrict-overflow]
       for (unsigned int i = 0;
       ^

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