20 Sep
2005
20 Sep
'05
8:48 a.m.
Erik de Castro Lopo wrote:
Gcc-4.0 catches this:
erikd(a)miles > cat test.c int main (void) { if (0) ; return 0 ; } erikd(a)miles > gcc-4.0 -W -Wall test.c -o /dev/null test.c: In function 'main': test.c:3: warning: empty body in an if-statement
Yes, but only if you use -W -Wall, which wine unfortunately doesn't :/ bash-3.00$ cat > t.c int boo(int arg) { if (arg); return 0; } bash-3.00$ /usr/local/gcc-4.0.1/bin/gcc -c -Wall t.c bash-3.00$ /usr/local/gcc-4.0.1/bin/gcc -c -W -Wall t.c t.c: In function 'boo': t.c:2: warning: empty body in an if-statement Mike