This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: alloca + inline



On 16 Mar 2003, Gabriel Dos Reis wrote:

> 
> It is not vote time.  That was a bug and fixed -- see RTH's message.
>  

RTH's message sais that there is no **auto** inlining of
functions that reference alloca.
I read the http archives of the list.

always_inline attribute overrides the patch.

> | With the logic "an inline is as fast as a macro"
> | an inline function has nothing to do with the stack.
> 
> Sure, it has all to do with the stack.  For example, local variables
> in an inline function have to be put the in caller stack.  And any
> manipulation of the inline callee stack frame now has to be done on
> the caller's stack.
> 

I tend to see inline functions as compound statements
in expressions. When I said that it has nothing to do
with the stack, I meant exactly what you say: all it's
locals are in the caller's stack and therefore the function
will not sub/add esp.

Anyway, I presume you don't want to guarantee this
is indeed the standatd behaviour. ok.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]