相关疑难解决方法(0)

只选择部分翻译单元禁用GCC警告?

与此MSVC预处理器代码最接近的GCC是什么?

#pragma warning( push )                    // Save the current warning state.
#pragma warning( disable : 4723 )          // C4723: potential divide by 0
// Code which would generate warning 4723.
#pragma warning( pop )                     // Restore warnings to previous state.
Run Code Online (Sandbox Code Playgroud)

我们在常用的标题中包含代码,我们不希望生成特定的警告.但是,我们希望包含这些标头的文件继续生成该警告(如果项目启用了该警告).

c c++ gcc pragma compiler-warnings

82
推荐指数
3
解决办法
5万
查看次数

标签 统计

c ×1

c++ ×1

compiler-warnings ×1

gcc ×1

pragma ×1