This question already has an answer here:
Why are these constructs (using ++) undefined behavior?
Undefined behavior and sequence points
This is textbook undefined behavior. The compiler can do whatever the hell it wants to. By the language spec, it is allowed to halt and catch fire, should it so choose; be glad they just did something vaguely related to the nonsense you fed them.