This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80472] cannot use push/pop with #pragma GCC diagnostic warning "-Wsystem-headers"
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Aug 2017 12:20:05 +0000
- Subject: [Bug c++/80472] cannot use push/pop with #pragma GCC diagnostic warning "-Wsystem-headers"
- Auto-submitted: auto-generated
- References: <bug-80472-4@http.gcc.gnu.org/bugzilla/>
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.