Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!bcm!rice!uw-beaver!sumax!amc-gw!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.lang.c Subject: Re: scope of malloc Keywords: alloca Message-ID: <169@nazgul.UUCP> Date: 20 Nov 90 04:15:45 GMT References: <3739@skye.ed.ac.uk> <14448@smoke.brl.mil> <650@metaware.metaware.com> <8790@scolex.sco.COM> Reply-To: bright@nazgul.UUCP (Walter Bright) Distribution: usa Organization: Zortech, Seattle Lines: 15 /I guess with a little help from a god, writing a whole compiler to handle /one routine can be considered "reasonable," but most of us don't necessarily /think so (this coming from someone who worked on compilers for quite a /while). I write compilers for a living (Zortech's). I implemented alloca() as a compiler intrinsic in a few hours, including a test suite for it. Mostly it consisted of setting a flag telling the code generator to always do a full stack frame for that function. Most people tell me I'm conceited, but I didn't think that implementation of alloca() was that godlike! :-) I always think of setting flags that perturb the code generator as a kludge to be avoided. Maybe it was that Coca-Cola induced euphoria :-)