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

From: Jens Axboe
Date: Thu Jul 15 2004 - 00:58:25 EST


On Wed, Jul 14 2004, Andrew Morton wrote:
> Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
> >
> > Or you could just call it "gcc is dumb" rather than a compiler bug.
>
> Yeah, but doing:
>
> static inline foo(void);
>
> bar()
> {
> ...
> foo();
> }
>
> static inline foo(void)
> {
> ...
> }
>
> is pretty dumb too. I don't see any harm if this compiler feature/problem
> pushes us to fix the above in the obvious way.

Excuse my ignorance, but why on earth would that be dumb? Looks
perfectly legit to me, and I have to agree with Jeff that the compiler
is exceedingly dumb if it fails to inline that case.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/