Re: GCC 3.4 and broken inlining.

From: Arjan van de Ven
Date: Thu Jul 08 2004 - 16:12:19 EST


On Thu, Jul 08, 2004 at 10:52:25PM +0200, Adrian Bunk wrote:
> > 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)).
>
> include/linux/compiler-gcc3.h says:
>
> <-- snip -->
>
> #if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4
> # define inline __inline__ __attribute__((always_inline))
> # define __inline__ __inline__ __attribute__((always_inline))
> # define __inline __inline__ __attribute__((always_inline))
> #endif
>
> <-- snip -->
>
>
> @Arjan:
> This was added as part of your
> [PATCH] ia32: 4Kb stacks (and irqstacks) patch
> What's the recommended solution for Nigel's problem?

the problem I've seen is that when gcc doesn't honor normal inline, it will
often error out if you always inline....
I'm open to removing the < 4 but as jakub said, 3.4 is quit good at honoring
normal inline, and when it doesn't there often is a strong reason.....

Attachment: pgp00000.pgp
Description: PGP signature