DIP69 - Implement scope for escape proof references
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sun Dec 7 02:35:48 PST 2014
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
More information about the Digitalmars-d
mailing list