31 Dec
2003
31 Dec
'03
14:22
Marcus Meissner
But why is there no warning when optimization is turned on? (When the warning is actually needed :-) This is my main point.
It is there with -Wall on SuSE Linux 9.0:
$ cat xx.c void f(char *s) { while (*s) { *s++ = *s | 0x20; } } $ gcc -O2 -Wall -c xx.c xx.c: In function `f': xx.c:3: Warnung: operation on `s' may be undefined
It is the toupper that turns it off then:
markgray@soyo:/usr/src/packages/BUILD/bug> cat xx.c
#include