www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Do we have an equivalent of __builtin_return_address?

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
i.e. https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html -- Andrei
Apr 06 2016
next sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
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
The exception mechanism does this kind of thing if nothing else does.
Apr 06 2016
prev sibling parent reply Kai Nacke <kai redstar.de> writes:
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
Apr 06 2016
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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
Apr 06 2016
parent Johannes Pfau <nospam example.com> writes:
Am Wed, 6 Apr 2016 12:40:24 -0400
schrieb Andrei Alexandrescu <SeeWebsiteForEmail 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.
Apr 06 2016