C Compiler bug

Mark Plotnick mp at allegra.UUCP
Tue Jul 22 04:35:06 AEST 1986


The i /= f and i *= f bugs occur in the 4.3bsd-beta and 4.2bsd
compilers (I don't know about pre-4.2).  The bug is that the
computation is done in integer rather than floating point.  The 4.3bsd
and System V VAX compilers do the right thing.

We first noticed this bug on a 4.3bsd-beta system, when we saw
"i *= 0.7" compile into "clrl _i".  Incorrect code, but it's sure fast!

	Mark Plotnick
	allegra!mp



More information about the Comp.lang.c mailing list