禁用所有gcc警告 [英] Disable all gcc warnings

查看:143
本文介绍了禁用所有gcc警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个项目,该项目将读取特定种类的编译器错误消息并对它们做有用的事情。我正在测试这个样本代码库(一个随机的开源应用程序),因此经常重建,包含一些产生警告的位,这些警告对我来说不重要。



如何禁用GCC中的所有警告,所以如果有任何警告消息,我只能看到错误消息? -w 是禁用警告消息的GCC范围选项。


I'm working on a project that will read compiler error messages of a particular variety and do useful things with them. The sample codebase I'm testing this on (a random open-source application), and hence rebuilding frequently, contains a few bits that generate warnings, which are of no interest to me.

How do I disable all warnings from GCC, so I can just see error messages if there are any?

解决方案

-w is the GCC-wide option to disable warning messages.

这篇关于禁用所有gcc警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆