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/51309] -Wstrict-overflow false alarm when overflow impossible in loop body


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

Eric Gallager <egallager at gcc dot gnu.org> changed:

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

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
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.

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