Re: [PATCH 2.4.31 7/9] gcc4: fix const function warnings

From: Willy Tarreau
Date: Sun Jun 12 2005 - 07:37:04 EST


On Sun, Jun 12, 2005 at 10:14:51PM +1000, Nick Piggin wrote:
(...)
> const functions are those that don't have side effects and depend
> only on their argument list. So such functions can be CSE'ed or
> reordered.
>
> If it makes sense to use on any inline function, then I think it
> makes sense if they're only using asm. Actually I would have thought
> it would *only* help inline functions using asm, because gcc may
> not know that such asm is 'const'.
>
> But that's not to say they should be removed just because they
> can't help gcc - it may be instructive to the programmer, or more
> robust when making modifications to the code (eg. uninlining).

Thanks for the clarification, Nick.

Willy

-
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/