Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: evilness of alloca! Message-ID: <17063@mimsy.UUCP> Date: 22 Apr 89 19:42:39 GMT References: <19255@adm.BRL.MIL> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 Alloca() is a poor-man's substitute for the language construct f() { int n = expr(); char mem[n]; ... If dynamic stack declarations were supported directly by the language, this sort of thing (now done with alloca) would be portable and reasonable. Because it is not, alloca is not portable. In particular, implementing alloca requires either compiler hooks or a limited amount of compile-time optimisation. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris