<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 20, 2014 at 1:38 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The __has_attribute implementation does not pay attention to the<br>
syntax supported by attributes -- instead, it looks to see whether an<br>
attribute is generally known with that spelling. Since pragmas can now<br>
be spelled as attributes, this means __has_attribute(loop) returns<br>
true because of the #pragma loop functionality. Same for unroll.<br>
<br>
Should __has_attribute ignore attributes spelled with a #pragma spelling?</blockquote><div><br></div><div>I would go further: __has_attribute should probably only look for GNU-syntax attributes. We have __has_cpp_attribute for C++-syntax attributes now, and I don't think anyone is (yet) using this for __declspec, so now seems like a good time to make this change.</div></div></div></div>