From: Adrian Bunk <bunk@st...> - 2007-08-20 19:57:14
On Mon, Aug 20, 2007 at 12:40:30PM -0700, Andrew Morton wrote:
> On Fri, 17 Aug 2007 15:43:40 -0400
> Jeff Dike <jdike@...> 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).
"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