DIP69 - Implement scope for escape proof references

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 7 02:50:52 PST 2014


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

You can add shorthand aliases for them too. :)

@forceinline void foo ();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141207/e2149c74/attachment.html>


More information about the Digitalmars-d mailing list