[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 22 10:40:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jeffrey Walton from comment #13)
> #if GCC_DIAGNOSTIC_AWARE
> # pragma GCC diagnostic push
> # pragma GCC diagnostic ignored "-Wunused-value"
> # pragma GCC diagnostic ignored "-Wunused-variable"
> #endif

As far as I understand, the #pragma should work as expected for those two
warnings. Only those warnings given during preprocessing and lexing are
affected by this bug.


More information about the Gcc-bugs mailing list