I find it odd that you need -pedantic to get warnings. Something like -std=c89 -Wall ought to be enough. (Of course, you may want to use -pedantic anywy, for some other reason, that should be orthogonal to selecting the ANSI-C version)
/ Niels Möller ()
Previous text:
2002-12-09 17:00: Subject: gcc 3.2
That is the default.
pelix:~/tmp% gcc -c foo.c pelix:~/tmp% gcc -std=c89 -c foo.c pelix:~/tmp% gcc -std=c99 -c foo.c pelix:~/tmp% gcc -pedantic -c foo.c foo.c: In function `main': foo.c:5: warning: ISO C89 forbids mixed declarations and code pelix:~/tmp% gcc -pedantic -std=c89 -c foo.c foo.c: In function `main': foo.c:5: warning: ISO C89 forbids mixed declarations and code pelix:~/tmp% gcc -pedantic -std=c99 -c foo.c pelix:~/tmp%
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)