The second guide explains some cases for undefined behavior, but it mixes up some things (or explains them poorly)...<p>For example, I understand why <i>signed integer overflow</i> and <i>violating type rules</i> are UB; the first allows the compiler to optimize many inequalities, while the second enables various optimizations that rely on alias analysis.<p>But I can&#x27;t understand why e.g. <i>use of an uninitialized variable</i> or <i>oversized shift amounts</i> are UB. Unless these also enable some powerful optimizations (the article doesn&#x27;t mention any, and I can&#x27;t think of any either), it would be much better to leave them <i>implementation defined</i>, not <i>undefined</i>. In that case, reading an uninitialized variable could result in any value, but it would still make the whole program valid.<p>Edit: should have said &quot;platform-defined&quot; instead of &quot;implementation-defined&quot;.