public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* alloca within inline function
@ 2004-04-13  9:07 Agri
  2004-04-13 13:38 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Agri @ 2004-04-13  9:07 UTC (permalink / raw)
  To: gcc-help

As wrote at the libc manual
   * A variable size array's space is freed at the end of the scope of
     the name of the array.  The space allocated with `alloca' remains
     until the end of the function.

What about inline function? Does space allocated with alloca withing inline
function is being freed at the end of the function, or at the "real" return?
Is it the same in "c" and "c++"?

Agri

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: alloca within inline function
  2004-04-13  9:07 alloca within inline function Agri
@ 2004-04-13 13:38 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2004-04-13 13:38 UTC (permalink / raw)
  To: Agri; +Cc: gcc-help

On Apr 13, 2004, Agri <agri@desnol.ru> wrote:

> As wrote at the libc manual
>    * A variable size array's space is freed at the end of the scope of
>      the name of the array.  The space allocated with `alloca' remains
>      until the end of the function.

> What about inline function?

Functions that call alloca are not inlined.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-13 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13  9:07 alloca within inline function Agri
2004-04-13 13:38 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).