[cfe-dev] A new builtin: __builtin_stack_pointer()

Joerg Sonnenberger joerg at britannica.bec.de
Thu Nov 7 01:47:54 PST 2013


On Wed, Nov 06, 2013 at 05:46:43PM -0800, Behan Webster wrote:
> Another way would be to introduce a new builtin in parallel to others
> like __builtin_return_address(). Essentially adding a
> __builtin_stack_pointer() which does what the above code does. The idea
> would be to get something like this added to both clang and gcc in order
> to make this work across compilers, and across arches.

You still haven't said what the intended behavior of this builtin is
when the function containing it is inlined.

Joerg



More information about the cfe-dev mailing list