🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #2046

Re: A question on local variable allocation

#2046
From: Michael Crawford
Date: Wed, 28 Feb 1990 19:44
47 lines
2128 bytes
Moving this over from gnu.gcc...

In article <25EAFE2C.2545@paris.ics.uci.edu> you write:
>
>> (in general -- I do not know much about gcc).  I could
>>image there could be some trouble with alloca() working properly if called
>>inside, or outside of the blocks.
>
>Please state the problem so that us non-clarvoiants can think about it.

alloca() monkeys with the stack differently on different machines.  I don't
know too much about it, this was just a gut-level feeling.

I program by intuition, you know.  Don't mean to get you mad or anything.

Seems to me, and I do not have the ANSI spec, but jumping in and out of a
block, if allowed at all, should preserve the data in the block so you can
access it when you get back.  If you cannot allow this, why allow jumping
into a block at all?  Admittedly goto's are gross, but if you're gonna have
them, ought to have them done in a reasonable manner.

>
>>Michael D. Crawford
>>Oddball Enterprises
>
>Do you manufacture oddballs or just repair them? :-)

We _are_ them.  Oddballs, I mean, me and my partner, a carpenter.

Oddball Enterprises, manufacturer of software and fine furniture.

>// Ron Guilmette (rfg@ics.uci.edu)
>// C++ Entomologist
>// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.

Motto:  Oddball Enterprises, Tilting at Windmills for a Better Tommorrow.
-- 
Michael D. Crawford
Oddball Enterprises
694 Nobel Drive
Santa Cruz, CA 95060
oddball!mike@ucscc.ucsc.edu

Consulting for Apple Computer Inc.
escher@apple.com

The opinions expressed here are solely my own.
Technical Details
Message-ID: <6964@internal.Apple.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!apple!escher
References: <25E58087.11649@paris.ics.uci.edu> <6915@internal.Apple.COM> <25EAFE2C.2545@paris.ics.uci.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!apple!escher
From: escher@Apple.COM (Michael Crawford)
Newsgroups: gnu.misc.discuss
Subject: Re: A question on local variable allocation
Summary: block scope should be preserved.
Message-ID: <6964@internal.Apple.COM>
Date: 28 Feb 90 19:44:39 GMT
References: <25E58087.11649@paris.ics.uci.edu> <6915@internal.Apple.COM> <25EAFE2C.2545@paris.ics.uci.edu>
Organization: Apple Computer Inc., Cupertino, CA
Lines: 47