This is the mail archive of the
mailing list for the GCC project.
Re: Further observations regarding alloca on i586-pc-linux-gnu
- To: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Subject: Re: Further observations regarding alloca on i586-pc-linux-gnu
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 23 Aug 1998 22:32:41 -0600
- cc: rth at cygnus dot com, carlo at runaway dot xs4all dot nl, egcs-bugs at cygnus dot com, pommnitz at darmstadt dot gmd dot de, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199808231820.UAA00204@mira.isdn.cs.tu-berlin.de>you write:
> > This is well known. What is not clear to me though, is whether
> > it is a bug in the compiler or in the test.
> I've tried to find documentation on the semantics of alloca in gcc,
> but didn't found much. The portable alloca.c says
I don't think alloca's behavior is defined by GCC. You'll probably
need to look at an ANSI or POSIX standard.
I don't happen to have either handy, but I did find this blurb on
my HPUX system:
alloca() Allocates space from the stack of the caller for
a block of at least size bytes, but does not
initialize the space. The space is
automatically freed when the calling routine
Memory returned by alloca() is not related to
memory allocated by other memory allocation
functions. Behavior of addresses returned by
alloca() as parameters to other memory functions
The implementation of this routine is system
dependent and its use is discouraged.