Mail Archives: djgpp/1998/10/06/21:52:09
> I think you get the highest level of warnings by using -Wall -O -ansi
> -pedantic
Even -Wall doesn't turn on *all* the warnings. There are a few more
that are non-obviously warnings (i.e. the code may be correct, but gcc
can't tell for sure) that have to be explicitly enabled. DJGPP's libc
makefiles do this.
Also be warned that using -ansi with DJGPP disables parts of the
system headers, so that the mere use of a non-ANSI function (including
POSIX functions) produces a warning.
Also, -Werror allows you to turn warnings into errors, so that
compilations fail unless they are warning-free. DJGPP's libc does
this.
For reference, here are the command-line options DJGPP's libc is build
with:
-MD -O2 -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -Wall -Wbad-function-cast -Wcast-qual -Werror
-Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wshadow
-Wstrict-prototypes -Wtraditional -Wwrite-strings -nostdinc
- Raw text -