by rini17 · 2y ago · 0 comments
In practical terms, compilers are allowed to reorder calculations, and the print might as well not be there if it's after a crash.
In theoretical terms, once UB is guaranteed to happen then your program execution is no longer valid, the entire execution, and the compiler is not bound by any rules whatsoever.