Suppose I have:
int x=INT_MAX-1; if (x+2 > INT_MAX) cout << "ERROR";
Will this case undefined behavior?
Where the compiler will save the temporary result of
x+2, will it use int by default, double by default, the same type of x or it will be smart enough to choose something big enough?
Source: Windows Questions C++