gcc has this warning flag:
-Wunknown-pseudo-comments Warn when the #pragma directive is encountered that is not understood by GCC. If this command line option is used, warnings will even be issued for unknown pragmas in the system header files. This is not the case if warnings were only enabled using the -Wall command line option.
And as usual, you can deny this, that is, unknown pragmas will not be warned. That is, use -Wno-unknown-pragmas .
Note that -Wno-unknown-pragmas should appear after any command line flags that enable this warning, for example -Wall - this also disables warnings for all unknown pragmas, so use with caution.
source share