[Bug c/51309] -Wstrict-overflow false alarm when overflow impossible in loop body

2017-07-25 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51309

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||egallager at gcc dot gnu.org
 Resolution|--- |WORKSFORME

--- Comment #1 from Eric Gallager  ---
I can't seem to reproduce the warning; all of these are silent:

$ /usr/local/bin/gcc -Wstrict-overflow -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow=1 -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow=2 -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow=3 -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow=4 -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow=5 -O2 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -O1 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -O0 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -Os -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -Og -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -O3 -S u.c
$ /usr/local/bin/gcc -Wstrict-overflow -Ofast -S u.c

And seeing as -Wstrict-overflow is being considered for deprecation in the next
release of GCC anyways, I think I can close this.

[Bug c/51309] -Wstrict-overflow false alarm when overflow impossible in loop body

2017-07-25 Thread eggert at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51309

--- Comment #2 from Paul Eggert  ---
(In reply to Eric Gallager from comment #1)
> I can't seem to reproduce the warning

Thanks, I can no longer reproduce the warning either. I used GCC 7.1.1 20170622
(Red Hat 7.1.1-3). So it looks like the problem is fixed.