strict-overflow warnings with gcc-4.7.0

Eray Aslan eray.aslan at caf.com.tr
Mon Jun 4 09:37:36 EDT 2012


krb5-1.10.2:
I am getting the following warnings with gcc-4.7.0 with -O[s1-9]
optimization levels (but not with gcc-4.6.3).  I have no idea if they are
false positives.

Perhaps someone with lex/yacc foo can have a look.

Thank you.

[...]
x86_64-pc-linux-gnu-gcc -fPIC -DSHARED -DLIBDIR=\"/usr/lib64\"
-DDYNOBJEXT=\".so\"  -I../../../include -I../../../include -I./../os
-I../../.. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/usr/include/et -O2
-pipe -march=native -fno-strict-aliasing -fno-strict-overflow -Wall
-Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length
-Woverflow -Wstrict-overflow -Wmissing-format-attribute
-Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses
-Wswitch -Wunused-function -Wunused-label -Wunused-variable
-Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized
-Werror=declaration-after-statement -Werror=variadic-macros
-Werror-implicit-function-declaration -pthread -c deltat.c -o
deltat.so.o && mv -f deltat.so.o deltat.so
x-deltat.y: In function ‘yyparse’:
deltat.c:1279:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
deltat.c:1279:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
deltat.c:1279:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
[...]
x86_64-pc-linux-gnu-gcc   -I../../include -I../../include -I.
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/usr/include/et -O2 -pipe
-march=native -fno-strict-aliasing -fno-strict-overflow -Wall
-Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length
-Woverflow -Wstrict-overflow -Wmissing-format-attribute
-Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses
-Wswitch -Wunused-function -Wunused-label -Wunused-variable
-Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized
-Werror=declaration-after-statement -Werror=variadic-macros
-Werror-implicit-function-declaration -pthread -c getdate.c
getdate.y: In function ‘getdate_yylex’:
getdate.y:815:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
getdate.y: In function ‘getdate_yyparse’:
y.tab.c:1436:6: warning: assuming pointer wraparound does not occur when
comparing P +- C1 with P +- C2 [-Wstrict-overflow]
y.tab.c:1436:6: warning: assuming pointer wraparound does not occur when
comparing P +- C1 with P +- C2 [-Wstrict-overflow]
getdate.y:815:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
y.tab.c:1436:6: warning: assuming pointer wraparound does not occur when
comparing P +- C1 with P +- C2 [-Wstrict-overflow]
getdate.y:815:6: warning: assuming pointer wraparound does not occur
when comparing P +- C1 with P +- C2 [-Wstrict-overflow]

-- 
Eray Aslan


More information about the krbdev mailing list