Hi,

I'm new to contributing to GCC, so I looked for issues in Bugzilla with the
keyword "easyhack" that looked comprehensible to me, and found bug 53920: "'gcc
-E' does not honor #pragma GCC diagnostic ignored '-Wunused-macro'". I
verified using a fresh build of gcc from the master branch that when "gcc
-E -Wunused-macros" is used to invoke the preprocessor on the following two
lines, a warning is given for the unused FOO macro despite the #pragma
directive:

#pragma GCC diagnostic ignored "-Wunused-macros"
#define FOO

My impression is that the preprocessor is ignoring the content of pragma
diagnostics when invoked with -E, and that the proposed change is to add
support for handling pragma diagnostics for this use case. The Bugzilla
entry for this issue hasn't been commented on since 2013, so I want to make
sure this is actually a good thing to work on. Might there be a reason why
support for handling pragma diagnostics is missing from c-ppoutput.c?

Thanks,
Chelsea Meyers

Reply via email to