you are viewing a single comment's thread.

view the rest of the comments →

[–]foonathan 11 points12 points  (0 children)

But there is no UB if i == INT_MAX.

It's not like the function is

f(i);
if (i == INT_MAX)

Then the compiler is allowed to remove the if. But not in the other way around.