[cfe-dev] always_inline and noinline attributes

Devang Patel dpatel at apple.com
Tue Jul 22 10:38:45 PDT 2008


On Jul 22, 2008, at 8:11 AM, Eli Friedman wrote:

> Unless I'm mistaking the semantics of always_inline, it should be a
> compile-time error to take the address of an always_inline function,
> and always_inline functions shouldn't be exposed as external symbols.
> Otherwise, it's impossible for the compiler to honor the
> "always_inline" attribute.

1) inlining a function and 2) throwing away a function definition when  
function is inlined at all call sites are two separate operations.

always_inline does not enforce 2) and always_inline does change symbol  
visibility.

In gcc, -fvisibility-inlines-hidden enforces what you're describing.
-
Devang



More information about the cfe-dev mailing list