This expression is undefined in C and in C++. It has no "right" answer whatsoever: the language assumes that you, the programmer, never attempt to modify the same variable twice in the same expression (without sequencing, which you don't have here)
Undefined behavior exists in C-based languages because the designers of C wanted it to be an extremely efficient low-level programming language. In contrast, languages like Java (and many other 'safe' languages) have eschewed undefined behavior because they want safe and reproducible behavior across implementations, and willing to sacrifice performance to get it. While neither is "the right goal to aim for," if you're a C programmer you really should understand what undefined behavior is.
- Chris Lattner, in LLVM project blog