Recommended gcc warning options for C [closed]

I routinely use:

    gcc -m64 -std=c99 -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual \
        -Wstrict-prototypes -Wmissing-prototypes

This set catches a lot for people unused to it (people whose code I get to compile with those flags for the first time); it seldom gives me a problem (though -Wcast-qual is occasionally a nuisance).

Leave a Comment