This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: alloca "bug" on x86?
- To: law at cygnus dot com
- Subject: Re: alloca "bug" on x86?
- From: dvv at dvv dot ru (Dima Volodin)
- Date: Tue, 21 Sep 1999 13:04:59 GMT
- Cc: Nick Ing-Simmons <nik at tiuk dot ti dot com>, gcc at gcc dot gnu dot org
- Organization: Huh?
- References: <30235.937918266@upchuck.cygnus.com>
On Tue, 21 Sep 1999 06:51:06 -0600, you wrote:
>
> In message <199909211234.NAA22457@tiuk.ti.com>you write:
> > Nick Ing-Simmons <nik@tiuk.ti.com> writes:
> > >This is a multi-part message in MIME format...
> > >
> > >The attached distilled fragment has been working fine on SPARC for years.
> > >(I include .c file for brevity, the preprocessed .i file for reproduceabil
> > ity
> > >and the .s file for easy examination.)
> >
> > Why did it attach like that?
> > anyway here are .c and .s files in a more-readable form
>That's a known problem. You should not use alloca within a function call
>sequence like that.
>
>This may be a bug in the compiler, or it may not have defined behavior
>according to the standard. I don't know. But I do know it doesn't work :-)
alloca ()? In the standard? What standard? :-) Anyway here's a snippet
from Solaris' man page:
The alloca() function is machine-, compiler-, and most of
all, system-dependent. Its use is strongly discouraged.
Of course, it'd be nice if the compiler gathered all allocas in an
expression and evaluated them before the rest of the expression, but
then again...
>jeff
Dima