Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-02-15 Thread Jason Merrill
On Thu, Feb 15, 2018 at 4:27 AM, Jakub Jelinek wrote: > On Thu, Feb 15, 2018 at 01:12:08AM -0500, Jason Merrill wrote: >> > This is just a partial fix, one thing this patch doesn't change is that >> > the standard says that __VA_OPT__ ( contents ) should be treated as >> >

Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-02-15 Thread Jakub Jelinek
On Thu, Feb 15, 2018 at 01:12:08AM -0500, Jason Merrill wrote: > > This is just a partial fix, one thing this patch doesn't change is that > > the standard says that __VA_OPT__ ( contents ) should be treated as > > parameter, which means that #__VA_OPT__ ( contents ) should stringify it, > > which

Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-02-14 Thread Jason Merrill
On 01/10/2018 07:04 AM, Jakub Jelinek wrote: The following patch attempts to fix various issues, including some ICEs, by introducing 3 new states, two of them are alternatives to INCLUDE used for the very first token after __VA_OPT__( , where we want to take into account also flags from the

Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-02-14 Thread Jason Merrill
On 01/10/2018 07:04 AM, Jakub Jelinek wrote: I've also cross-checked the libcpp implementation with this patch against trunk clang which apparently also implements __VA_OPT__ now, on the testcases included here the output is the same and on their macro_vaopt_expand.cpp testcase, if I remove all

Ping^2: Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-01-26 Thread Jakub Jelinek
Ping^2 http://gcc.gnu.org/ml/gcc-patches/2018-01/msg00727.html On Wed, Jan 17, 2018 at 05:47:12PM +0100, Jakub Jelinek wrote: > I'd like to ping this patch. > As I wrote, it isn't a full solution for all the __VA_OPT__ issues, > but it isn't even clear to me how exactly it should behave, but

Ping: Re: [PATCH] __VA_OPT__ fixes (PR preprocessor/83063, PR preprocessor/83708)

2018-01-17 Thread Jakub Jelinek
Hi! I'd like to ping this patch. As I wrote, it isn't a full solution for all the __VA_OPT__ issues, but it isn't even clear to me how exactly it should behave, but fixes some ICEs and a couple of most important issues and shouldn't make things worse, at least on the gcc and clang __VA_OPT__