Even by respecting operator precedences, you're not respecting sequence points and thus invoking undefined behavior.
Take a look at the cpp faq here: http://www.parashift.com/c++-faq/sequence-points.html
The C++ standard says (1.9p7),
At certain specified points in the execution sequence called sequence
points, all side effects of previous evaluations shall be complete and
no side effects of subsequent evaluations shall have taken place.
For example, if an expression contains the subexpression y++, then the
variable y will be incremented by the next sequence point. Furthermore
if the expression just after the sequence point contains the
subexpression ++z, then z will not have yet been incremented at the
moment the sequence point is reached.
The order of evaluation of operands of individual operators and subexpressions of individual expressions, and the order in which side effects take place, is unspecified
Additional info on sequence points: https://stackoverflow.com/a/4176333/1938163