<p dir="ltr"><br>
On 7 Dec 2014 10:40, "Jacob Carlborg via Digitalmars-d" <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br>
><br>
> On 2014-12-07 01:49, Manu via Digitalmars-d wrote:<br>
><br>
>> I have std.simd sitting here, and I really want to finish it, but I<br>
>> still don't have the tools to do so.<br>
>> I need, at least, forceinline to complete it, but that one *is*<br>
>> controversial - we've talked about this for years.<br>
>><br>
>> GDC and LDC both have a forceinline, so I could theoretically support<br>
>> those compilers, but then I can't practically make use of them without<br>
>> some sort of attribute aliasing system, otherwise I need to triplicate<br>
>> the code for each compiler, just to insert a different (compiler<br>
>> specific) forceinline attribute name. It'd be really great if we<br>
>> agreed on just one.<br>
><br>
><br>
> I don't know about LDC but at least GDC allows you to use UDA's instead of a pragma. Then you can create a dummy attribute for DMD (and LDC):<br>
><br>
> version (GNU)<br>
>     import gcc.attribute<br>
><br>
> else<br>
> {<br>
>     struct attribute<br>
>     {<br>
>         string attr;<br>
>     }<br>
> }<br>
><br>
> @attribute("forceinline") void foo ();<br>
></p>
<p dir="ltr">You can add shorthand aliases for them too. :)</p>
<p dir="ltr">@forceinline void foo ();</p>