Previous: Additional warning options, Up: Compilation options [Contents][Index]
The following options are a good choice for finding problems in C and C++ programs:
$ gcc -ansi -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings
While this list is not exhaustive, regular use of these options will catch many common errors.