Still false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you're using unsigned int or a programming language which strictly defines integer overflow, possibly as an error)
for (int y = MIN_INT; y <= MAX_INT; y++) {
if (y == x + 1) {
x = y;
}
}
(Not sure there's a way to prevent Lemmy from escaping my left angle bracket. I definitely didn't type ampersand-el-tee-semicolon. You'll just have to squint and pretend. I'm using the default lemmy-ui frontend.)
It will not "overflow". Signed integer overflow is undefined behavior. The compiler could remove the whole loop or do anything else imaginable (or not).
I'm fairly certain that last one is UB in C. The result of an assignment operator is not an lvalue, and even if it were it's UB (at least in C99) to modify the stored value of an object more than once between two adjacent sequence points. It might work in C++, though.