<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 21, 2015 at 7:56 AM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">It sounds like there are not major objections to making __declspec<br>
controlled by -fms-extensions. Here's the patch I am proposing, with a<br>
few things called out.<br>
<br>
* __declspec is also a Borland extension in addition to an MS one<br>
* supporting __declspec under CUDA, but not the full set of ms extensions<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div> </div><div>Looks good. </div><div>Considering that cuda_builtin_vars.h is a borderline abuse of MS extensions, I'd be fine requiring explicit -fms-extensions in order to use that header, though I do like your approach of only enabling limited subset of MS extensions for CUDA better.</div><div><br></div><div>--Artem<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">
~Aaron<br>
</font></span><div class=""><div class="h5"><br>
On Wed, May 20, 2015 at 8:17 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> Can we just enable __declspec for CUDA rather than all of -fms-extensions?<br>
><br>
> Long-term, we should probably have some syntax for this CUDA evilness that's<br>
> not the MS __declspec extension...<br>
><br>
> On Wed, May 20, 2015 at 5:13 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
>><br>
>> That's Art's fault. Probably the easiest thing to do is enable<br>
>> fms-extensions for cuda and let it go at that.<br>
>><br>
>> On Wed, May 20, 2015 at 4:09 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
>> wrote:<br>
>>><br>
>>> This has one interesting ramification which I wasn't quite expecting.<br>
>>> cuda_builtin_vars.h uses __declspec(property), and it seems strange to<br>
>>> me that someone who wishes to use CUDA should have to also use<br>
>>> -fms-extensions. I'm not certain what the correct answer is for this<br>
>>> particular case.<br>
>>><br>
>>> ~Aaron<br>
>>><br>
>>> On Wed, May 20, 2015 at 5:54 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
>>> wrote:<br>
>>> > While refactoring some attribute parsing code, I noticed that we do<br>
>>> > not guard __declspec as being a Microsoft-specific extension that we<br>
>>> > support. This is consistent with the behavior we have for<br>
>>> > __attribute__. In both cases, the keyword is available everywhere, and<br>
>>> > specific attributes determine their target requirements. However, I<br>
>>> > wonder if that's the behavior we want.<br>
>>> ><br>
>>> > With __attribute__, it makes some degree of sense that we support it<br>
>>> > everywhere and own it as a core language extension. For instance, we<br>
>>> > allow users to add GNU-style attribute spellings that GCC does not<br>
>>> > support and no one takes issue.<br>
>>> ><br>
>>> > Do we want the same level of ownership over __declspec? If someone<br>
>>> > wants to add a new attribute with a __declspec spelling that is not<br>
>>> > supported by MSVC, will we allow it? I struggle to imagine us allowing<br>
>>> > that as it can cause future compatibility issues if Microsoft were to<br>
>>> > use the same attribute name with different semantics. For that reason,<br>
>>> > I think __declspec should be guarded by -fms-extensions, but I wanted<br>
>>> > to get community feedback before making such a change.<br>
>>> ><br>
>>> > Thanks!<br>
>>> ><br>
>>> > ~Aaron<br>
>>> _______________________________________________<br>
>>> cfe-commits mailing list<br>
>>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>
</div></div>