public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>, rth@cygnus.com
Cc: carlo@runaway.xs4all.nl, egcs-bugs@cygnus.com,
	pommnitz@darmstadt.gmd.de, egcs@cygnus.com
Subject: Re: Further observations regarding alloca on i586-pc-linux-gnu
Date: Sun, 23 Aug 1998 18:49:00 -0000	[thread overview]
Message-ID: <19980823155704.C4163@dot.cygnus.com> (raw)
In-Reply-To: <199808231820.UAA00204@mira.isdn.cs.tu-berlin.de>

On Sun, Aug 23, 1998 at 08:20:05PM +0200, Martin von Loewis wrote:
> > Note that the exact same effect would happen if alloca was not a
> > builtin.
> 
> No, it wouldn't. The portable alloca would not reclaim the memory
> until the next alloca call, and then only if the previous call was
> deeper on stack.

No no, I meant the olde tyme non-portable alloca.  You know:

	alloca: popl	%edx
		subl	%eax, %esp
		movl	%esp, %eax
		jmp	*%edx

> > Note that if you mind sequence points like you ought, you get
> > correct results.
> 
> The original example was using alloca as a default argument. It seems
> that g++ currently does not support that, an alloca call must occur as
> a full expression in itself, not inside a full expression.

"Full expression" isn't a term I'm familiar with.  Besides,

	(tmp = alloca(n), foo(tmp, blah));

works just fine.  It seems that alloca must be the first thing
after a sequence point.  How to enforce or even warn about this
I have absolutely no idea.


r~

  reply	other threads:[~1998-08-23 18:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-20  9:09 Joerg Pommnitz
1998-08-21  8:17 ` Noel Yap
1998-08-21 16:30 ` Alexandre Oliva
1998-08-22 11:00   ` Carlo Wood
1998-08-23  4:36     ` Richard Henderson
1998-08-23 12:13       ` Martin von Loewis
1998-08-23 18:49         ` Richard Henderson [this message]
1998-08-25 19:31           ` Martin von Loewis
1998-08-24  4:37         ` Jeffrey A Law
1998-08-25  7:28           ` Martin von Loewis
1998-08-24 10:48       ` Joerg Pommnitz
1998-08-25 12:45         ` Martin von Loewis
1998-08-25 19:31           ` Joerg Pommnitz
1998-08-25 19:31             ` Martin von Loewis
1998-08-25 23:05               ` signal 11 generating problem, was: " Joerg Pommnitz
1998-08-25 19:31                 ` Alexandre Oliva
1998-08-25 19:31                   ` Joerg Pommnitz
1998-08-25 23:05                   ` Martin von Loewis
1998-08-26  8:25                     ` Joe Buck
1998-08-26  5:20               ` Noel Yap
1998-08-26 11:57                 ` Joe Buck
1998-08-26  3:53             ` Andreas Schwab
1998-08-26 12:26             ` Oleg Zabluda
1998-08-27 13:38               ` Alexandre Oliva
1998-08-25 19:31         ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980823155704.C4163@dot.cygnus.com \
    --to=rth@cygnus.com \
    --cc=carlo@runaway.xs4all.nl \
    --cc=egcs-bugs@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=martin@mira.isdn.cs.tu-berlin.de \
    --cc=pommnitz@darmstadt.gmd.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).