>> N = 1;
>> A[N++] = N++;
On Sun, 3 Jun 2007, davis wrote:
Wow! Having used all the compilers mentioned in this
thread, I would
have assumed a[1]=1 since the post incs
*should not* happen until after the ; I'm missing the ambiguity,
although hard rules for post inc were fuzzy back then. (70's-80's)
Post incs not happening until after th ';' would be a reasonable way to
implement it. BUT, K&R did not specify that. The post incs can be done
any time after the value of N is fetched for evaluation until after the
';'. That is left as a decision for the compiler author to do in whatever
way they want to implement it.
Also, should we assume that N will be incremented twice?