Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!utah-cs!donn From: donn@utah-cs.UUCP (Donn Seeley) Newsgroups: net.lang.c,net.bugs Subject: Re: C Compiler bug (and fix for a different one) Message-ID: <3865@utah-cs.UUCP> Date: Sun, 27-Jul-86 06:13:36 EDT Article-I.D.: utah-cs.3865 Posted: Sun Jul 27 06:13:36 1986 Date-Received: Sun, 27-Jul-86 17:33:37 EDT References: <1380@hcrvx1.UUCP> <273@watmath.UUCP> <5858@alice.uUCp> Organization: University of Utah CS Dept Lines: 20 Xref: mnetor net.lang.c:5469 net.bugs:293 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@utah-cs.arpa 40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn