| |||
| Home > Standard C Implementation Definition > Implementation definition > Expression evaluation | |||
The compiler can re-order expressions involving only associative
and commutative operators of equal precedence, even in the presence
of parentheses. For example, a + (b + c) might
be evaluated as (a + b) + c if a, b,
and c are integer expressions.
Between sequence points, t
he compiler can evaluate expressions in any order, regardless of parentheses. Therefore, side effects of expressions between sequence points can occur in any order.
The compiler can evaluate function arguments in any order.
Any aspect of evaluation order not prescribed by the relevant standard can be varied by:
the optimization level you are compiling at
the release of the compiler you are using.