This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52116] pragma GCC diagnostic only acts on some lines
- 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: Tue, 09 Aug 2016 17:40:26 +0000
- Subject: [Bug c/52116] pragma GCC diagnostic only acts on some lines
- Auto-submitted: auto-generated
- References: <bug-52116-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52116
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Ben Longbons from comment #0)
> Case 1. Wrapping a warning location in _Pragma("GCC diagnostic ignored
> \"-Wshadow\"") does not work (sometimes). This precludes error suppression
> during macro expansion. Oddly, it suppresses as expected (mostly) if both
> are on the same line. (Although it behaves oddly if one is "warning" and one
> is "ignored")
This seems fixed in GCC 7.0, possibly earlier.