Do we have an equivalent of __builtin_return_address?

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 6 11:09:49 PDT 2016


Am Wed, 6 Apr 2016 12:40:24 -0400
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:

> On 04/06/2016 11:58 AM, Kai Nacke wrote:
> > On Wednesday, 6 April 2016 at 13:23:20 UTC, Andrei Alexandrescu
> > wrote:  
> >> i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html --
> >> Andrei  
> >
> > http://llvm.org/docs/LangRef.html#id1204, available in
> > ldc.intrinsics
> >
> > Regards,
> > Kai  
> 
> Thanks. Could we unify it across backends? -- Andrei
> 

All GCC builtins are available in GDC. Just import gcc.builtins:
http://goo.gl/vYhfsC

Unification should probably be done in druntime. I don't see a point in
implementing special handling for one builtin in the ldc or gdc
compilers as we already handle many (or all) builtins in the compiler
in some generic way.


More information about the Digitalmars-d mailing list