This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -ftrack-macro-expansion preprocessing of A######A (PR preprocessor/58844)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Dodji Seketeli <dseketel at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Feb 2014 23:42:14 +0000
- Subject: Re: [PATCH] Fix -ftrack-macro-expansion preprocessing of A######A (PR preprocessor/58844)
- Authentication-results: sourceware.org; auth=none
- References: <20140218172912 dot GO22862 at tucnak dot redhat dot com>
On Tue, 18 Feb 2014, Jakub Jelinek wrote:
> Hi!
>
> The following testcase build with -ftrack-macro-expansion=0,
> but don't build otherwise. The problem seems to be that
> the libcpp for macro redefinition warning/error purposes if it sees
> more than one paste operator adds those extra CPP_PASTE tokens at the end,
> after normal tokens from the macro. For -ftrack-macro-expansion=0 we were
> using macro_real_token_count (macro) to only use the real tokens for macro
> expansion purposes, but for track_macro_expansion it used macro->count,
> which includes also the extra tokens.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk (and after a while for 4.8)?
OK.
--
Joseph S. Myers
joseph@codesourcery.com