I need to disable warning in an include file.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
<some function>
#pragma GCC diagnostic pop
however in the main.cpp file which includes the above .h file I use
#pragma region class_definitions
I know it is "not standard pragma" - I use it to control huge amount of declarations in the main file as I use VS for editing code, before I go to linux
So I get this warning (which does NOT appear if I dont use #pragma GCC diagnostic push/pop
)
warning: ignoring ‘#pragma region class_definitions’ [-Wunknown-pragmas]
Is there a way to have a cake AND eat it?
EDIT: I tried this and the warning still shows
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma region class_definitions
#pragma GCC diagnostic pop