[cfe-dev] always_inline and noinline attributes

Devang Patel dpatel at apple.com
Tue Jul 22 10:40:11 PDT 2008


On Jul 22, 2008, at 10:38 AM, Devang Patel wrote:

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

oops, I meant : "always_inline does not change symbol visibility"
>
>
> In gcc, -fvisibility-inlines-hidden enforces what you're describing.
> -
> Devang
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list