&gt; I&#x27;m fine with my program crashing. I&#x27;m not fine with my compiler simply assuming this cannot happen, and removing the whole `if` statement.<p>What&#x27;s the difference? Do you mean you don&#x27;t want your compiler to ever reorder instructions? That would cost a <i>lot</i> of performance. Try to formalize the guarantee that you want the compiler to give in the presence of programs like that, and the reasons for leaving it undefined become a lot more clear.