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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/19/10 11:19 PM, Segher Boessenkool wrote:
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

Thank you. That could certainly be better documented. I searched for what I thought was the obvious thing "-W ", but of course here there's no space "-W."

Do you think two RFEs sensible RFE's would be

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.

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


Dave


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux