This is the mail archive of the
mailing list for the GCC project.
Re: Forbid __builtin_return_address when inlining
Jakub Jelinek writes:
> On Mon, Nov 27, 2006 at 03:15:35PM +0000, Andrew Haley wrote:
> > > Hmm, OK. But if I fixed the peculiar behavour then I could also
> > > remove the peculiar documentation, couldn't I? That would surely be
> > > an improvement.,,
> > Just to clarify: it's really easy for me just to fix this in the Java
> > langauge front-end, but that seems a little selfish.
> But is that really a fix? The current behavior lets the user choose
> what he prefers (i.e. either use __builtin_return_address and not
> noinline attribute and understand it will return the address of the
> caller of whatever this fuction has been inlined into), or use
> __builtin_return_address and noinline.
You could say the same about __builtin_return() and some of its
friends, but we forbid those.
> Changing this could break existing uses as well as take away
> one option from the users.
I really doubt that it could break existing uses, but OK. Seems like
a well-documented bug to me. Fair enough, I'll fix it in the Java