For those who want accurate information on the differences, as indicated in the standards, C99, Β§6.5.3 / 2 reads:
The operand value of the prefix ++ operator is incremented. The result is a new operand value after the increment.
Unlike C ++ 11, Β§5.3.2 / 1 says:
The result is an updated operand; it is an lvalue , and it is a bit field, if the operand is a bit field.
[highlight added in both cases]
Also note that although (++a)-- gives undefined behavior (at least in C ++ 03) when a is int , if a is a specific user type, so you use your own ++ overloads and -- , the behavior will be determined - in this case you get the equivalent:
a.operator++().operator--(0);
Since each operator leads to a function call (which cannot intersect), you actually have sequence points to force a specific behavior (note that I do not recommend using it, only noting that the behavior is really defined in this case).
source share