标签: c++ gcc clang warnings pragma
我有以下代码:
#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif
但是,如果我使用Clang编译代码,则会收到错误error: unknown warning group。为什么clang会在#ifdef __GNUC__之后编译代码?
error: unknown warning group
#ifdef __GNUC__