This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: alloca + inline
- From: Xanthakis Stelios <sxanth at ceid dot upatras dot gr>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 16 Mar 2003 15:11:31 +0200 (EET)
- Subject: 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.