What does the compiler option -W (upper case) do?
Segher Boessenkool
segher@kernel.crashing.org
Tue Oct 19 22:19:00 GMT 2010
> I've got some code written by someone else, which has
>
> g++ -W -Wall foobar.cc
>
> gcc is not indicting -W is an unknown option. The gcc documentation says
> -w
> (lower case) is to suppress all warnings, but I can't find -W (upper case)
> documented.
The index gets you to
http://gcc.gnu.org/onlinedocs/gcc-4.5.1/gcc/Warning-Options.html#index-W-236
-Wextra
This enables some extra warning flags that are not enabled by -Wall.
(This option used to be called -W. The older name is still supported,
but the newer name is more descriptive.)
Most people still use -W, it's so nice and short ;-)
Segher
More information about the Gcc-help
mailing list