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

Aaron Ballman aaron at aaronballman.com
Tue Feb 25 07:53:42 PST 2014


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.

~Aaron



More information about the cfe-dev mailing list