Quote:
Originally Posted by SaswatPadhi
This code has undefined behavior, since it modifies the lvalue a twice without an intervening sequence point.
See
http://en.wikipedia.org/wiki/XOR_swap_algorithm
The "Reasons for avoidance in practice" part is also worth a read.