Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cmcl2.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!floyd!cmcl2!mcbryan From: mcbryan@cmcl2.UUCP (Oliver A. McBryan) Newsgroups: net.bugs.4bsd Subject: BUG in 4.2BSD C compiler Message-ID: <5811@cmcl2.UUCP> Date: Sat, 2-Jun-84 21:44:30 EDT Article-I.D.: cmcl2.5811 Posted: Sat Jun 2 21:44:30 1984 Date-Received: Tue, 5-Jun-84 08:11:16 EDT Organization: New York University Lines: 33 /* * BUG in 4.2 BSD C Compiler: * * The following program succeeds on the first test, fails on * the second which should be identical. * * Both tests succeed if either * (a) every float is changed to double * or * (b) p.x is assigned to instead of p.y * */ #includestruct POINT { float x; float y; }; main() { struct POINT p, *q; float f; p.y = 0.1; f = 1.0; if (p.y < (f-.01)) printf("p: %g is < %g\n",p.y,f-.01); q = &p; if (q->y < (f-.01)) printf("q: %g is < %g\n",q->y,f-.01); }