gcc -W警告标志

Tem*_*pax 10 c gcc

我正在学习C,在某些例子中,我发现"使用gcc -W来启用警告",

但请阅读此处的文档:http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html

我找不到-W做什么.

谁能解释一下?

我说的是W而不是w.

问候,

oua*_*uah 17

-W现在已被-Wextragcc版本弃用.

gcc手册页:

   -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.)
Run Code Online (Sandbox Code Playgroud)

  • @Scooter`-Wextra`是`-Wall`未启用的警告,所以如果你想要两个警告:`-Wall -Wextra` (2认同)