Re: [PATCH][2.6.8-rc1-mm1] drivers/scsi/sg.c gcc341 inlining fix

Adrian Bunk
2004-07-14T19:06:20Z

On Wed, Jul 14, 2004 at 02:36:04PM -0400, Jeff Garzik wrote:
> Mikael Pettersson wrote:
> >It's needed, and no it's not a compiler bug.
>
> In fact, it is. gcc isn't properly inlining functions where uses occur
> before implementation of the inlined function.
>
> Or you could just call it "gcc is dumb" rather than a compiler bug.

gcc 3.4 seems to be the first gcc version that could actually handle
such cases.

But since the kernel uses -fno-unit-at-a-time, it doesn't work.

The problem with unit-at-a-time is that it might increase the stack
usage. Arjan explained this in the "GCC 3.4 and broken inlining." thread
that started Thursday.

> Jeff

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed