From: utzoo!watmath!watcgl!dmmartindale
Newsgroups: net.lang.c
Title: Re: order of evaluation
Article-I.D.: watcgl.211
Posted: Sat Feb 26 14:15:50 1983
Received: Sun Feb 27 00:11:48 1983
References: houxj.218 whuxk.150

The problem here is due to a misunderstanding.  In some languages, the
statement "a[i++] = i++;" would be called an "assignment statement",
with the subscript considered one expression, the stuff on the right hand
of the assignment operator another expression, and the assignment operator
itself not part of any expression.  In C, however, the assignment operator
is just like any other expression operator, and the whole thing above is
a single expression.  (Note that most statements in C are simply an expression
followed by a semicolon.)  So the compiler is justified in doing all the
pre-increments before and all the post-increments after the assignment itself.