0

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)

Bathsheba
  • 231,907
  • 34
  • 361
  • 483
Yves
  • 11,597
  • 17
  • 83
  • 180

0 Answers0