Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!ll-xn!ames!nrl-cmf!cmcl2!brl-adm!adm!ted%nmsu.csnet@relay.cs.net From: ted%nmsu.csnet@relay.cs.net Newsgroups: comp.unix.wizards Subject: back to the (ivory) tower Message-ID: <16018@brl-adm.ARPA> Date: 4 Jun 88 19:56:46 GMT Sender: news@brl-adm.ARPA Lines: 21 The 4.3 manual entry for alloca says: BUGS Alloca is both machine- and compiler-dependent; its use is discouraged. On the other hand, alloca is often used and strongly supported by the gnu camp (n.b. heavy use in emacs and bison). It is true that proper use does simplify many aspects of avoiding hard limits for things like line lengths and such. Alloca is also very handy in implementing stack gaps so that setjmp/longjmp can be used to do a weak implementation of coroutines and lightweight processes. It is also true that alloca is almost trivial to implement on most machines (say with a macro which expands to a single machine instruction to in(de)crement the stack pointer). What is the opinion of the masses? Is alloca really such a problem across differing architectures? Is it really that useful?