在gcc中禁用检查覆盖 [英] Disable check for override in gcc

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

问题描述

有没有办法强制gcc忽略由C ++ 11的重载产生的错误?

Is there a way to enforce gcc to ignore errors which result from C++11's override?

说明:我想在程序中启用C ++ 11。不幸的是,它滥用了库中的一些函数和宏,导致许多被标记的覆盖,但不覆盖错误。所以我想禁用错误,只是为了检查是否有更多问题,然后逐步更换错误。

Explanation: I want to enable C++11 in a program. Unfortunately it misused some functions and macros from a library causing many marked override, but does not override errors. So I want to disable the error, just to check if there are more issues and then replace the errors step by step.

我检查了 - W 选项,但他们只处理warings。这是一个真正的错误。

I checked the -W options, but they handle warings only. This is a real error.

推荐答案

作为一种黑客,您可以使用 -Doverride = 在命令行上。这将使得GCC不会看到覆盖

As a hack you can use -Doverride= on the command line. This will make it so GCC does not see override.

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

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