Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: alloca() portability Message-ID: <27696@mimsy.umd.edu> Date: 15 Nov 90 12:25:31 GMT References: <14377@smoke.brl.mil> <9122@ncar.ucar.edu> <27537@mimsy.umd.edu> <27634@mimsy.umd.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 15 In article <27634@mimsy.umd.edu> I wrote: >... The main advantage that > struct xyzzy p[n]; >(where `n' is a variable) has over the alloca hack is that the former >fails noisily whenever it fails, while the latter fails quietly when >the compiler happens to disarrange the stack because that saves a few >instructions. Oops, `former' and `latter' are reversed above. I meant that the array declaration fails noisily, while the alloca call fails silently (for more evidence, see the posting from someone who had this happen on that most forgiving of machines, a VAX). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris