This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63445] request: make -Wstrict-overflow avoid a class of false positives
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Oct 2014 12:28:38 +0000
- Subject: [Bug c/63445] request: make -Wstrict-overflow avoid a class of false positives
- Auto-submitted: auto-generated
- References: <bug-63445-4 at http dot gcc dot gnu dot org/bugzilla/>
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;
^