Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!mcvax!jim From: jim@mcvax.UUCP (Jim McKie) Newsgroups: net.bugs.4bsd Subject: Re: 4.2bsd C compiler generates incorrect code Message-ID: <410@mcvax.UUCP> Date: Sun, 13-Jan-85 17:22:57 EST Article-I.D.: mcvax.410 Posted: Sun Jan 13 17:22:57 1985 Date-Received: Tue, 15-Jan-85 01:09:45 EST References: <1327@hao.UUCP> Reply-To: jim@mcvax.UUCP (Jim McKie) Distribution: net Organization: CWI, Amsterdam Lines: 20 This bug was not in the original 4.2BSD compiler, but it appeared in an intermediate version; I have been told it is fixed in the next release. As an aside, the bug can be used to demonstrate something we all know: main() { int i=0, system5=5; float fourpointtwo[2]; fourpointtwo[i] = 4.2; if( fourpointtwo[i] > system5 ) printf("%1.1f > %d\n", fourpointtwo[i], system5); else printf("No bug here.\n"); } Jim McKie mcvax!jim