This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: __builtin_return_address


> 
> 2) You cannot rely on __builtin_return_address to return any
> meaningful information whatsoever except when its argument is zero.

??? Then at least the GCC docs needs to be changed.  It currently
says (in v2.95.2 release):

     On some machines it may be impossible to determine the return
     address of any function other than the current one; in such cases,
     or when the top of the stack has been reached, this function will
     return `0'.

According to this, all values but zero returned from
__builtin_return_address should be valid.

Also, is the platform the OP was talking about (Red Hat GNU/Linux)
really one of those where __builtin_return_address doesn't work?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]