Can&#x27;t you see the pattern here? Even LLVM devs are incapable of doing what they are requiring from random regular developers. If that does not motivate to address that kind of craziness more in depth in a systematic way to restore safety and defense in depth, I don&#x27;t know what will.<p>- Programmers can and do emit substantially simpler code if they have a guarantee from the platform&#x27;s implementation of &lt;feature x&gt;.<p>- Programmers think they have such a guarantee. (I don&#x27;t know a single programmer around me who knows the complete list of undefined behavior, myself included)<p>- Compiler injects bug -- and LLVM&#x2F;CLang seek excuse in the &quot;technically not a bug&quot; completely useless answer.<p>- Sane projects actually disable all that kind of crazyness (adding -fno-&lt;everything&gt; options every now and then) so all that kind of cute optims are useless in the real world (either dangerous, or completely disabled)<p>It&#x27;s actually reasonable to have a platform that e.g. gives you 2&#x27;s complement arithmetic or defines the result of shifts, or allows unaligned access, because mainstream computer hardware <i>does</i> provide those guarantee. And at least half of C programmers are not even aware those kind of stuff are technically forbidden, (historically often because of <i>other architectures</i>, some obscure, and not compiler optimizations, btw). More knowledgeable people who know about the spirit of the standard (1) can also be bitten by compiler revelation of bugs because compilers devs are doing literal and insane interpretation. Bug ensues, including security holes.<p>(1): Let me remind you about the definition of undefined behavior: &quot;behavior, upon use of a <i>nonportable</i> or erroneous program construct or of erroneous data,
for which this International Standard imposes no requirements&quot;
One keyword is <i>nonportable</i> and it is clearly not considered enough. So yes, there are numerous constructs that are reasonable to expect on a given architecture when we do not learn the compiler manual by heart, but some people don&#x27;t give a fuck about the principle of least astonishment when they can gain 1% on a synthetic benchmark.