Re: GCC 3.4 and broken inlining.

Nigel Cunningham
2004-07-08T12:12:06Z

Hi.

On Thu, 2004-07-08 at 22:07, Jakub Jelinek wrote:
> Try passing -Winline, it will tell you when a function marked inline is not
> actually inlined.

That's what I was using; no error message is printed. It is for other
functions.

> Presence of inline keyword is not a guarantee the function will not be
> inlined, it is a hint to the compiler.

> GCC 3.4 is much bettern than earlier 3.x GCCs in actually inlining functions
> marked as inline, but there are still cases when it decides not to inline
> for various reasons. E.g. in C++ world, lots of things are inline, yet
> honoring that everywhere would mean very inefficient huge programs.
> If a function relies for correctness on being inlined, then it should use
> inline __attribute__((always_inline)).

Okay. I'll do that then.

Thanks.

Nigel