Re: [PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-02-02 Thread Jakub Jelinek
On Mon, Feb 02, 2015 at 11:22:58PM +0100, Dodji Seketeli wrote: > Thanks. The patch that finally passed bootstrap is the one below. It's > slightly different in the condition I use to detect that we are popping > the context of the top-most macro expansion stored in > pfile->top_most_macro_node i

Re: [PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-02-02 Thread Dodji Seketeli
Jakub Jelinek writes: > On Mon, Feb 02, 2015 at 03:41:50PM +0100, Dodji Seketeli wrote: >> libcpp/ChangeLog: >> >> * internal.h (cpp_reader::top_most_macro_node): New data member. >> * macro.c (enter_macro_context): Pass the location of the end of >> the top-most invocation of the

Re: [PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-02-02 Thread Jakub Jelinek
On Mon, Feb 02, 2015 at 03:41:50PM +0100, Dodji Seketeli wrote: > libcpp/ChangeLog: > > * internal.h (cpp_reader::top_most_macro_node): New data member. > * macro.c (enter_macro_context): Pass the location of the end of > the top-most invocation of the function-like macro, or the

Re: [PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-02-02 Thread Dodji Seketeli
Jakub Jelinek writes: > On Fri, Jan 30, 2015 at 10:19:26AM +0100, Dodji Seketeli wrote: >> [This is a P1 regression for gcc 5] >> libcpp/ChangeLog: >> >> * internal.h (cpp_reader::top_most_macro_node): New data member. >> * macro.c (enter_macro_context): Pass the location of the end of

Re: [PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-02-02 Thread Jakub Jelinek
On Fri, Jan 30, 2015 at 10:19:26AM +0100, Dodji Seketeli wrote: > [This is a P1 regression for gcc 5] > libcpp/ChangeLog: > > * internal.h (cpp_reader::top_most_macro_node): New data member. > * macro.c (enter_macro_context): Pass the location of the end of > the top-most invocat

[PATCH] PR preprocessor/64803 - __LINE__ inside macro is not constant

2015-01-30 Thread Dodji Seketeli
[This is a P1 regression for gcc 5] Hello, Consider the example code mentionned in this PR: $ cat -n test.c 1 #define C(a, b) a ## b 2 #define L(x) C(L, x) 3 #define M(a) goto L(__LINE__); __LINE__; L(__LINE__): 4 M(a /* --> this is the line of the expansion point of M.