[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
General standards:
#error
if it
is not present.
It is okay to use nonessential compiler extensions that can simply be
disabled on other compilers. In particular, GCC's __attribute__
((format (...)))
is handy.
The same applies to new features in C99.
-Wall -W
-Wpointer-arith -Wstrict-prototypes
. Another option to consider using
is -Wwrite-strings
. Options -ansi -pedantic
are good for
finding standards violations, but compiling clean against them is not
always realistic for real-world code, especially as sometimes system
headers trigger warnings from these options. Additionally,
-fno-builtin
can find mistakes, but using it for release versions
may not be desirable. Finally, -Werror
is good for development
but not release.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |