This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32102] New: -Wall stomps on -Wstrict-overflow
- From: "mec at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2007 02:46:30 -0000
- Subject: [Bug c/32102] New: -Wall stomps on -Wstrict-overflow
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is with the 4.3-20070525 snapshot.
Test program:
void Alpha();
void Beta() {
int i;
for (i = 1; i > 0; ++i)
Alpha();
}
This invocation produces no warnings:
/home/mec/gcc-4.3-20070525/install/bin/gcc -O2 -S -Wstrict-overflow=2 -Wall
z1.c
This invocation produces warnings:
/home/mec/gcc-4.3-20070525/install/bin/gcc -O2 -S -Wall -Wstrict-overflow=2
z1.c
z1.c: In function 'Beta':
z1.c:5: warning: assuming signed overflow does not occur when simplifying
conditional to constant
It looks like -Wall sets the strict overflow warning level to 1, quietly
stomping on the earlier setting.
--
Summary: -Wall stomps on -Wstrict-overflow
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mec at google dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32102