[comp.lang.c++] Problem with stream lib due to cfront bug

mueller@iaoobelix.UUCP (Joachim Mueller) (05/09/89)

Recently we installed the AT&T 1.2.1 Compiler on SUN 3/60 with OS3.5. But
we have major problems with the stream library. What we found is that the
cfront seems to optimize a variable away which is needed.

In stream.h the overflow function has the default EOF for the argument
c:

	virtual overflow(int c=EOF);

If we translate the code for filebuf.c with cfront 1.2.1 the variable
_au0_c does not appear in the resulting C code.

	virtual overflow(int c);

But if we delete the default value for the variable c then _au0_c is kept.

It seems to be an obvious bug. Has anybody already solved this problem?


Joachim Mueller
UUCP:       uunet!unido!iaoobel!mueller
BITNET:     mueller@DS0IFF5
VOICE:      +49-711-61954-41