Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: alloca() portability Message-ID: <1990Nov17.221822.25202@zoo.toronto.edu> Organization: U of Toronto Zoology References: <1990Nov09.233527.7489@chinet.chi.il.us> <27608@mimsy.umd.edu> <8789@scolex.sco.COM> Date: Sat, 17 Nov 90 22:18:22 GMT In article <8789@scolex.sco.COM> seanf@sco.COM (Sean Fagan) writes: >Lessee... we've had Chris and Doug denounce alloca(), but I haven't seen >anything from Henry (yet? I suspect he would also denounce it)... Suspicion confirmed. Alloca() is a kludge that should have died long ago. There *is* a general problem with the need for various kinds of cleanup on exiting a function, either by the normal route or by longjmp(), but alloca solves only one special case of that, at the cost of major portability problems and new opportunities for interesting bugs. A proper fix is impossible without language changes. -- "I don't *want* to be normal!" | Henry Spencer at U of Toronto Zoology "Not to worry." | henry@zoo.toronto.edu utzoo!henry