pgcc equivalent to __builtin_return_address

Dear all,

I’m searching for an equivalent to

void * __builtin_return_address (unsigned int level)

with level == 0 (see [1]).

It found it to be available in several other compilers, e.g., gcc, icc, xlc, clang, fcc[px], craycc.

pgcc 17.9-0 just reports an undefined reference. Is there an equivalent or do I have to use a special compiler option?

Any help appreciated, thanks,
Christian

[1] https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html

Hello,

I have created TPR 25016 to request the addition of this C extension to the libraries.

dave

Thank you!

25016 - Please support gcc C extension ‘__builtin_return_address’

is now supported in the 18.3 and future releases.


dave