如何禁用#pragma警告? [英] How to disable #pragma warnings?
本文介绍了如何禁用#pragma警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在开发C ++应用程序时,我不得不使用第三方库,它产生了与使用无害的#pragma指令相关的大量警告。
While developing a C++ application, I had to use a 3rd party library which produced a huge amount of warnings related with a harmless #pragma directive being used.
../File.hpp:1: warning: ignoring #pragma ident
In file included from ../File2.hpp:47,
from ../File3.hpp:57,
from File4.h:49,
推荐答案
也许请参阅 GCC诊断编译指示?或者,在这种情况下,您可以使用选项组合, -Wall
启用,不包括 -Wunknown-pragmas
。
Perhaps see GCC Diagnostic Pragmas? Alternatively in this case you could use the combination of options that -Wall
enables, excluding -Wunknown-pragmas
.
这篇关于如何禁用#pragma警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文