Re: GCC 3.4 and broken inlining.

Arjan van de Ven
2004-07-08T21:11:08Z

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

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 #2: Type: application/pgp-signature, Size: 189 bytes --]