Problem with compiling automatically generating C

Sam Kendall sam at delftcc.UUCP
Tue Feb 25 02:29:54 AEST 1986


In article <347 at watcgl.UUCP>, mherman at omnitor.UUCP writes:
> Second, [using C++] we ran into problems with the 4.2BSD C compiler with
> expression stack overflows (I'm not real sure it was the expression
> stack any more).  Anyway, one of our trusty Unix people modified cc to
> dynamically relocate the stack when the overflow occurred.

Our product (Bcc, a C checkout compiler), like C++, generates C code
which is compiled by the resident PCC-based compiler.  I think the
problem described above is the same one we run into: automatically
generated code tends to have large expressions, and large expressions
overflow the available storage for parse trees.  For the PCC, that
storage is a fixed-size array.

I urge UNIX vendors either to do what the "trusty Unix person" did, or
just to greatly increase ALL the table sizes in your PCC-based compiler,
the expression tree storage table in particular.  If you have virtual
memory, then making the table sizes very large should not hurt--for most
tables, the unused part will never be touched.  Don't assume merely
"reasonable" limits for table sizes, because automatically generated
programs will exceed The Limits of the Imagination.

----
Sam Kendall			     allegra \
Delft Consulting Corp.		seismo!cmcl2  ! delftcc!sam
+1 212 243-8700			       ihnp4 /
ARPA: delftcc!sam at nyu.ARPA



More information about the Comp.lang.c mailing list