Define PRAGMA_DIAGNOSTIC

Define Documentation

PRAGMA_DIAGNOSTIC(ARGS)

Expands to a compiler-specific #pragma on GCC and clang.

On GCC it is equivalent to

#pragma GCC diagnostic ARGS

On clang it is equivalent to

#pragma clang diagnostic ARGS

On other compilers it does nothing.

Example usage:

PRAGMA_DIAGNOSTIC(ignored "-Wpedantic")

Parameters
  • ARGS – arguments for your compiler’s diagnostic pragma, as raw tokens.