Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-29 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 04/25/2012 05:07 AM, Dodji Seketeli wrote: + /* If the first token we got was a padding token, let's put + it back into the stream so that cpp_get_token will get it + first; and if we are currently expanding a macro, don't +

Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-29 Thread Jason Merrill
OK. Jason

Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-28 Thread Jason Merrill
On 04/25/2012 05:07 AM, Dodji Seketeli wrote: + /* If the first token we got was a padding token, let's put +it back into the stream so that cpp_get_token will get it +first; and if we are currently expanding a macro, don't +forget that information.

Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-25 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 04/10/2012 03:42 PM, Dodji Seketeli wrote: In that case, besides returning NULL, enter_macro_context sets pfile-context-c.macro to NULL, making cpp_get_token_1 forget to set the location of the vari to the expansion point of A. This seems like a bug

Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-11 Thread Jason Merrill
On 04/10/2012 03:42 PM, Dodji Seketeli wrote: In that case, besides returning NULL, enter_macro_context sets pfile-context-c.macro to NULL, making cpp_get_token_1 forget to set the location of the vari to the expansion point of A. This seems like a bug that should be fixed rather than worked

[PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-10 Thread Dodji Seketeli
Consider the test case gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c. Its interesting part is: #define A(x) vari x /* line 7. */ #define vari(x) #define B , varj int A(B) ; /* line 10. */ In its initial version, this test was being pre-processed as: # 1