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 ();

--
/Jacob Carlborg

Reply via email to