Re: GCC 3.4 and broken inlining.

Andi Kleen
2004-07-11T05:53:55Z

On Sat, Jul 10, 2004 at 06:25:52PM -0300, Alexandre Oliva wrote:
> > And then just mark the function you know needs to be inlined
> > as __always_inline__.
>
> It's probably a good idea to define such functions as `extern inline'
> (another GCC extension), such that a definition of the function is
> never emitted, and you get a linker error if the compiler somehow
> fails to emit an error on a failure to inline the function.

That used to be done in the past for all functions, but it was
stopped because gcc suddenly stopped inlining functions it did previously
and it caused a lot of spurious linker errors.

I guess it could be readded if the inlining heuristics were fixed,
but even in gcc 3.5 it still looks quite bleak.

-Andi