Operator precedence is about making tree, and it won't affect the order of evaluation.
The tree should look like ((ii) = ((i) / (++(i))))
in every compiler.
On the other hand, the evaluation order is unspedified, so we cannot tell which of left hand i
and right hand ++i
is evaluated earlier.
If former is evaluated first, the expression will be 1 / 2
, but if the latter is evaluated first, the expression will be 2 / 2
.
N1256 6.5 Expressions
2 Between the previous and next sequence point an object shall have its stored value
modified at most once by the evaluation of an expression. 72) Furthermore, the prior v alue
shall be read only to determine the value to be stored. 73)
3 The grouping of operators and operands is indicated by the syntax. 74) Except as specified
later (for the function-call (), &&, ||, ?:, and comma operators), the order of evaluation
of subexpressions and the order in which side effects take place are both unspecified.