This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pragma diagnostic push/pop
- From: Tom Tromey <tromey at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Jun 2010 21:00:33 -0600
- Subject: Re: pragma diagnostic push/pop
- References: <201006110142.o5B1gqcR022118@greed.delorie.com>
- Reply-to: tromey at redhat dot com
>>>>> "DJ" == DJ Delorie <dj@redhat.com> writes:
DJ> This is long overdue... first try on location-sensitive pragma-based
DJ> diagnostic control.
Nice!
DJ> @@ -703,30 +703,34 @@ handle_pragma_diagnostic(cpp_reader *ARG
[...]
DJ> token = pragma_lex (&x);
DJ> @@ -313,16 +313,72 @@ diagnostic_classify_diagnostic (diagnost
[...]
DJ> + /* Handle pragmas separately, since we need to keep track of *where*
DJ> + the pragmas were. */
DJ> + if (input_location > 0)
I would prefer it if new code avoided the global input_location and
instead took a source_location as a parameter.
This ought to be pretty easy since handle_pragma_diagnostic has a token
available.
Tom