This is obvious to you, because obviously i will be assigned first i+1 , and then second will be assigned the value 2 .
However, both of these assignments are performed in the same sequence, therefore they relate to the compiler to which frist occurs, and what happens secondly, therefore different compiler implementations can generate code that will give different results, therefore it is UB .
Binary binary
source share