Re: [PATCH 1/6] UML - Fix inlines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 20, 2007 at 12:40:30PM -0700, Andrew Morton wrote:
> On Fri, 17 Aug 2007 15:43:40 -0400
> Jeff Dike <[email protected]> wrote:
> 
> > "extern inline" will have different semantics with gcc 4.3.
> 
> What are these different semantics?

With gcc <= 4.2, when using "extern inline" in no case the function is
compiled on its own, not even if you refer to its address explicitly.  
Such an address becomes an external reference, as if you had only 
declared the function, and had not defined it.

In C99 (and therefore in gcc >= 4.3), "extern inline" means that the 
function should be compiled inline where the inline definition is seen, 
and that the compiler should also emit a copy of the function body with 
an externally visible symbol.

Except for the Alpha port all users in the kernel used "extern inline" 
only for getting "static inline" semantics (older gcc versions didn't 
offer the always_inline function attribute).

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

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux