> Understanding how your compiler enforces it's abstract machine is beneficial
The compiler does not enforce it though. It only implements the abstract machine, and the implementation is only correct for UB-free programs.
The compiler does not enforce it though. It only implements the abstract machine, and the implementation is only correct for UB-free programs.
The actual hardware behavior is useful for other purposes, like understanding why the abstract machine is the way it is, or understanding and improving the performance of well-defined programs, but it is not useful at all once you have UB.