Disable check for override in gcc

老子叫甜甜 提交于 2019-12-11 02:47:17

问题


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

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.

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


回答1:


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



来源:https://stackoverflow.com/questions/30303228/disable-check-for-override-in-gcc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!