Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!petrus!scherzo!allegra!mit-eddie!think!harvard!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c Subject: Re: Example Program: a[i]=b[i++] non-portability Message-ID: <363@hadron.UUCP> Date: Tue, 8-Apr-86 00:39:15 EST Article-I.D.: hadron.363 Posted: Tue Apr 8 00:39:15 1986 Date-Received: Thu, 10-Apr-86 01:21:43 EST References: <359@g.cs.cmu.edu> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 14 Summary: This differs from the original. In article <357@g.cs.cmu.edu>, ckk@g.cs.cmu.edu (Chris Koenigsberg) writes: > We ran into a similar problem with a section of code containing > "i=0; while(i and we found that the Sun 120 4.2 C compiler decided that a[0] gets b[1], > while the IBM RT PC ACIS 4.2 C compiler decided that a[1] gets b[1] and a[0] > gets nothing (remains null, if it was initialized this way). In article <359@g.cs.cmu.edu> ckk@g.cs.cmu.edu (Chris Koenigsberg) writes: >On the sun, a[0] gets b[0], but on the RT PC, a[1] gets b[0] and a[0] is >a null. Note that one says a[1] <- b[1] and t'other says a[1] <- b[0] on the RT PC. Chris, now do you understand what folks were getting upset over? (Hint: the former.)