I just read this link. Now I know why i = i++
is an UB.
But I don't know why ++++i
is an UB too.
For example,
int i = 2;
++++i;
I think the value of i
should be 4. Isn't this a defined behavior? (I'm talking about C++98 and C++03)
I just read this link. Now I know why i = i++
is an UB.
But I don't know why ++++i
is an UB too.
For example,
int i = 2;
++++i;
I think the value of i
should be 4. Isn't this a defined behavior? (I'm talking about C++98 and C++03)