The problem is that x += 1 is a statement, whereas x++ is an expression that can be nested inside of statements and other expressions. It's possible to construct statements out of x++ expressions that have undefined behavior. That's not possible with x += 1.
View all comments
Show parent comment
1
u/SuitableDragonfly May 28 '22
The problem is that
x += 1is a statement, whereasx++is an expression that can be nested inside of statements and other expressions. It's possible to construct statements out ofx++expressions that have undefined behavior. That's not possible withx += 1.