gcc将所有警告视为错误,除X外 [英] gcc treat all warnings as errors EXCEPT X

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

问题描述

出于最好未提及的原因,我想将所有警告视为错误,除了一个警告(已弃用),我希望作为警告。



有没有更方便的方法来完成这个工作,而不是列出所有我想用手处理错误的警告?你可以做 -Werror -Wno-error =弃用


For reasons best left unmentioned, I want to treat all warnings as erros, except for a single warning (deprecated) which I would like to tread as a warning.

Is there any more convenient way to do this than listing out all the warnings I want to treat as errors by hand?

解决方案

You can do -Werror -Wno-error=deprecated.

这篇关于gcc将所有警告视为错误,除X外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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