How to disable all warnings using pragma directives in GCC
问题 I am seeking for a way to suppress all possible warnings that i may get with Gcc with pragma directives. I had made some guard macros that help me silence 3rd party headers from warnings, and for now they work like charm for msvc and clang. I am still missing the correct way to use Gcc diagnostic pragmas in order to suppress every warning in a section. Let me give you some examples: In msvc we can do this: #pragma warning(push, 0) // Code that produces warnings... #pragma warning(pop) And in