`-Wwrite-strings'
When compiling C, give string constants the type `const
char[LENGTH]' so that copying the address of one into a
non-`const' `char *' pointer will get a warning. These warnings
will help you find at compile time code that can try to write into
a string constant, but only if you have been very careful about
using `const' in declarations and prototypes. Otherwise, it will
just be a nuisance. This is why we did not make `-Wall' request
these warnings.
When compiling C++, warn about the deprecated conversion from
string literals to `char *'. This warning is enabled by default
for C++ programs.
Bookmarks