4 ms·
This post is very good. One thing to add, is that if you code has not entered a state of UB yet, but will at some point, then all bets are off. The phenomenon i
by quelsolaar 4y ago
This post is very good. One thing to add, is that if you code has not entered a state of UB yet, but will at some point, then all bets are off. The phenomenon is generally known as time traveling UB.
Compilers assume your code doesnt contain UB. Example:
If(x == 0)
printf(“hello”);
y /= x;
The compiler can assume x is not zero because it assumes the user will not cause UB, therfore the if statement and printf can be removed.