Re: [PATCH] __has_{,cpp_}attribute fixes (PR preprocessor/63831)

2014-12-19 Thread Ed Smith-Rowland
On 12/17/2014 05:43 PM, Jakub Jelinek wrote: On Wed, Dec 17, 2014 at 04:14:00PM -0500, Jason Merrill wrote: On 12/05/2014 03:28 PM, Jakub Jelinek wrote: 3) there is no __has_attribute__ middle-end secondary macro, when it is a built-in macro, it works fine in #ifdef too I'm not sure what

Re: [PATCH] __has_{,cpp_}attribute fixes (PR preprocessor/63831)

2014-12-17 Thread Jason Merrill
On 12/05/2014 03:28 PM, Jakub Jelinek wrote: 3) there is no __has_attribute__ middle-end secondary macro, when it is a built-in macro, it works fine in #ifdef too I'm not sure what the rationale for the secondary macro was. Ed? -cb_has_attribute (cpp_reader *pfile)

Re: [PATCH] __has_{,cpp_}attribute fixes (PR preprocessor/63831)

2014-12-17 Thread Jakub Jelinek
On Wed, Dec 17, 2014 at 04:14:00PM -0500, Jason Merrill wrote: On 12/05/2014 03:28 PM, Jakub Jelinek wrote: 3) there is no __has_attribute__ middle-end secondary macro, when it is a built-in macro, it works fine in #ifdef too I'm not sure what the rationale for the secondary macro was.

[PATCH] __has_{,cpp_}attribute fixes (PR preprocessor/63831)

2014-12-05 Thread Jakub Jelinek
Hi! This patch rewrites __has_attribute support, so that: 1) it is normal built-in macro, so it can be expanded even outside of #if (apparently clang supports that) 2) it is expanded properly even during preprocessing 3) there is no __has_attribute__ middle-end secondary macro, when it is a