12

我正在学习 C,在一些示例中我发现“使用 gcc -W 启用警告”,

但在这里阅读文档:http: //gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Warning-Options.html

我找不到 -W 做什么。

有人可以解释吗?

我说的是W而不是w。

问候,

4

1 回答 1

19

-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.)
于 2012-08-21T19:36:03.493 回答