Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site t4test.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!harpo!seismo!hao!hplabs!intelca!t4test!chip From: chip@t4test.UUCP (Chip Rosenthal) Newsgroups: net.lang.c Subject: Neophyte's question raised re: pcc problem Message-ID: <438@t4test.UUCP> Date: Mon, 2-Apr-84 21:12:04 EST Article-I.D.: t4test.438 Posted: Mon Apr 2 21:12:04 1984 Date-Received: Sat, 7-Apr-84 01:40:44 EST References: <501@mprvaxa.UUCP> Organization: Intel, Santa Clara, Ca. Lines: 21 > From: keashly@mprvaxa.UUCP (Lance Keashly) > > m(){ > int a,b,c; > { > /* case 2 ideally "a" should have the same value after but pcc > interprets them differently (K&R say that it is OK 185) */ > if ( a = b++ + b ); > a = b++ + b; > } Anybody want to handle a question I have about the above? It has never been clear to me what an expression like "a = b++ + b" evaluates to, i.e. would the right-hand addend be the value before or after the incrementation? Is the answer to this compiler/machine dependant? (Mailing a response is probably preferable to posting.) Thanks. Chip Rosenthal, Intel/Santa Clara {pur-ee,hplabs,ucbvax!amd70,ogcvax!omsvax}!intelca!t4test!chip