Neophyte's question raised re: pcc problem
Chip Rosenthal
chip at t4test.UUCP
Tue Apr 3 12:12:04 AEST 1984
> From: keashly at 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
More information about the Comp.lang.c
mailing list