What does the compiler option -W (upper case) do?

Ian Lance Taylor iant@google.com
Wed Oct 20 13:51:00 GMT 2010


On Wed, Oct 20, 2010 at 6:35 AM, Dr. David Kirkby
<david.kirkby@onetel.net> wrote:

> 1) Make a note by "-w" that's it not to be confused with -W, since the two
> options are almost opposite of each other.

Well, perhaps, but in general with gcc the case of the option matters.

> 2) Document -W to say it's a depreciated option - one should use -Werror
> instead?

-W is the same as -Wextra, not -Werror.  The option is documented, in
the sense that it is in the index and the text.  I don't see any
particular reason to formally deprecate it.  If you have specific
suggestions for how to adjust the docs, that would be helpful.

Ian



More information about the Gcc-help mailing list