[cfe-dev] [PATCH] New syntax and functionality for __has_attribute

Alp Toker alp at nuanti.com
Tue Feb 25 08:02:31 PST 2014


On 25/02/2014 15:53, Aaron Ballman wrote:
> On Tue, Feb 25, 2014 at 10:51 AM, David Chisnall
> <David.Chisnall at cl.cam.ac.uk> wrote:
>> On 25 Feb 2014, at 15:13, Alp Toker <alp at nuanti.com> wrote:
>>
>>> Changing the semantics means pain for our users until those compilers go away, and compilers have a tendency to stick around :-/
>> And headers expecting the old behaviour.  FreeBSD and OS X both ship system headers that use __has_attribute(), shooting off the feet of our users is simply not acceptable.
> There's some misinformation happening which I'll clear up -- the
> semantics are the same as always. If you provide __has_attribute with
> a plain identifier, it behaves the same as it always has. The only
> difference this patch proposes is allowing additional syntax where you
> specify more than just a plain identifier.

Right, the discussion relates to making the proposed syntax easy to use 
in a way that won't break existing clang deployments further down the line.

Existing headers using __has_attribute() are unaffected by this either way.

Alp.


-- 
http://www.nuanti.com
the browser experts




More information about the cfe-dev mailing list