[Bug c++/80472] cannot use push/pop with #pragma GCC diagnostic warning "-Wsystem-headers"

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Aug 19 23:44:00 GMT 2017


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
It seems pretty straight-forward:

1. Abstract out the check for classification_history.

2. Create a function diagnostic_report_warnings_p that checks the
classification history of Wsystem-headers in addition to the option value.

Not that -Wsystem-headers is not a typical warning option, so more work would
be needed to have

#pragma GCC diagnostic error "-Wsystem-headers"

give errors instead  of warnings

or

-Werror
#pragma GCC diagnostic warning "-Wsystem-headers"

give warnings instead of errors. But that seems less important to fix.


More information about the Gcc-bugs mailing list