Re: [discuss] [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline"

Michael Matz
2005-09-06T21:41:19Z

Hi,

On Tue, 6 Sep 2005, Terrence Miller wrote:

> Andi Kleen wrote:
> > I don't think the functionality of having single copies in case
> > an out of line version was needed was ever required by the Linux kernel.
>
> But shouldn't the compiler that compiles Linux be C99 compliant?

As "extern inline" is a GNU extension I don't understand this remark.
The notion of "function marked as inline but in fact wasn't inlined"
simply isn't covered by any C(++) standard, and isn't detectable by any
C99 compliant program. Hence a compiler understanding this extension
could still be c99 compliant (right now I don't know if "extern inline"
would be a invalid c99, if it is, then see below).

Perhaps you meant "shouldn't linux be compilable by a compiler which only
is C99 compliant". If you meant this, then I would say no ;-) Think
e.g. inline asms, which a purely (in the sense of providing nothing more)
C99 compiler couldn't provide. OTOH gcc with the right options _is_
mostly c99 compliant, so in this sense linux is already compilable by a
c99 compliant compiler.

Ciao,
Michael.