This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens
- From: Tom Tromey <tromey at redhat dot com>
- To: Dodji Seketeli <dodji at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Jason Merrill <jason at redhat dot com>
- Date: Tue, 15 May 2012 12:35:43 -0600
- Subject: Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens
- References: <m3bolpofpx.fsf@redhat.com>
>>>>> "Dodji" == Dodji Seketeli <dodji@redhat.com> writes:
Dodji> To properly fix this, I think libcpp should keep the token of the
Dodji> pasting operator '##', instead of representing it with flag on the LHS
Dodji> operand's token. That way, it could use its location.
Originally I had thought that a pasted token should have a special
virtual location, pointing to the locations of its source tokens.
This would let later code "undo" the paste, if need be.
I don't know any more if this idea makes sense or not.
Tom