Sometimes if you have undefined behavior, you want the documented extension to happen.<p>Or you want the <i>de facto</i> widely understood behavior to happen which has happened on every compiler you&#x27;ve used in 30 years: at least every compiler that was for two&#x27;s complement matchines. Or every compiler on which pointers to different data types were of the same size. And so on.<p>You also don&#x27;t want to be burned by code that is relying on a common extension, when that is ported.<p>There is a word for the compiler approach of &quot;we&#x27;re going to optimize this based on the assumption that the program is not relying on a common extension that is technically UB&quot;.<p>That word is: <i>malpractice</i>.<p>For instance, it is not unusual for C code to be targetting machines in which all objects are in the same address space, such that pointers are internally like binary numbers, allowing pointers to different objects to be compared for inequality:  ptr1 &lt; ptr2  &#x2F;* does ptr1 point to a lower address than ptr2 in the one big address space? <i>&#x2F;<p>Programmers expect this work consistently with the address structure of the machine. They don&#x27;t want the expression to be somehow wrongly optimized based on the assumption that ptr1 and ptr2 must point to the same object.<p>Implementations must honor requirements beyond those of ISO C. Such as, for instance, behaviors that </i>those same compilers* used to define historically in their past revisions.<p>If GCC has behaved a certain way for 25 years, and some code has come to depend on that, and then that is suddenly taken away, such that entire GNU&#x2F;Linux distros continue to compile, but break in random places because of that detail, the fault for the regression lies 105% with the doofus who made the GCC commit. Even if that behavior is not defined by ISO C.