This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Gcl-devel] Re: sibling call optimization
On Thu, 2004-05-06 at 08:00, Camm Maguire wrote:
> Thanks! -fno-inline-functions restored the sibling call. Is this
> 'inline overrides sibling' behavior intentional?
I seriously doubt it, but it is hard to say without a testcase. It
would be reasonable to submit a bugzilla bug report if you find a
testcase.
> Is there any way
> that I can write the call itself in a way to prevent inlining in that
> instance? I.e. to let the callee be inlined elsewhere, but to prevent
> it where I want the sibcall?
__attribute__ ((noinline)) will prevent it from being inlined
everywhere. Since I don't know why inlining and sibcalls aren't working
together, I can't suggest a work around for this specific problem.
> I noticed there was a long thread about defining some attribute and/or
> warning regarding sibling call optimization a few years ago.
I don't recall that discussion, so I can't comment on it. It would
probably be reasonable to have something like -Wsibcall patterned after
the existing -Winline option. I don't know of anyone planning to do
anything like that though.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com