现在的位置: 首页 > 综合 > 正文

[gcc] gcc编译时不提示警告信息

2017年10月07日 ⁄ 综合 ⁄ 共 563字 ⁄ 字号 评论关闭

你可以使用'-W'开始的选项来请求许多特定的警告,例如-Wimplicit要求对隐式声明发出警告。所有这些特定的警告选项也有一个以-Wno-开头的否定形式来关闭警告;例如︰-Wno-explicit


来源:https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

You can request many specific warnings with options beginning with ‘-W’, for example -Wimplicit to request warnings on implicit declarations. Each of these specific warning options also has a negative form beginning ‘-Wno-’ to turn off warnings; for example,
-Wno-implicit. This manual lists only one of the two forms, whichever is not the default. For further language-specific options also refer to C++ Dialect Options and Objective-C and Objective-C++ Dialect Options.  

抱歉!评论已关闭.