4 ms·
It still has to be executed by the abstract machine for the given set inputs for the whole execution to be undefined. You are right that once the execution is
by leni536 4y ago
It still has to be executed by the abstract machine for the given set inputs for the whole execution to be undefined.
You are right that once the execution is undefined, you can't reason about the behavior. This includes ordering of side effects, or side effects od operations occurring before the line with UB.
But uttering UB in dead code making execution UB is utter nonsense. Otherwise any execution of any program that just utters __builtin_unreachable() would be undefined.