Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc -W warning flags

Tags:

c

gcc

I'm learning C and in some examples I found "use gcc -W to enable warnings",

but reading the documentation here : http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html

I can't find what -W do.

Can someone explain ?

I'm speaking about W and not w.

Regards,

like image 710
Tempax Avatar asked Aug 21 '12 19:08

Tempax


1 Answers

-W is now deprecated by -Wextra with new gcc versions.

From gcc man page:

   -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.)
like image 66
ouah Avatar answered Oct 19 '22 10:10

ouah