C Compiler bug (and fix for a different one)
Donn Seeley
donn at utah-cs.UUCP
Sun Jul 27 20:13:36 AEST 1986
The 'i /= f' bug is fixed in 4.3 BSD. Someone (Hugh Redelmeier) stated
earlier that this bug was fixed in System V but some implementations
caused side effects in the left hand side to be duplicated. This was
one of the problems that made the fix quite difficult for 4.3; the
solution was fairly ugly but it works. Essentially what happens is
that the compiler front end notices the special situation and avoids
'type balancing'; special code table entries enable the code generator
to spot these trees and do the right thing. (This approach is properly
termed 'hacking'.) I wasn't able to test this bug on our local System V
boxen -- neither of them (SGI Iris, rev 3.4; HP-UX 5.0) have any form
of the '/=' fix...
The 4.3 compiler no longer generates an 'incompatible types' message
for void expressions in the ':' part of a '?' expression -- it prints
'value of void expression used'!
Will wonders never Cse,
Donn Seeley University of Utah CS Dept donn at utah-cs.arpa
40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn
More information about the Comp.lang.c
mailing list