如何在 c++/gcc 编译中禁用此代码示例的警告?该警告似乎不是常见的警告。那么如何禁用它呢?
它与后面的代码相似吗?
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable" //I don't know ignore what for the code in pic.
#include "subfolder/ClassTwo.h"
#pragma GCC diagnostic pop
但忽略什么?
我尝试了一个答案,但弹出一个错误:for
#pragma GCC diagnostic push
它弹出:
warning: expected [error|warning|ignored] after â#pragma GCC diagnosticâ