GCC always assumes aligned pointer accesses (2020)
The arguments in this blogpost are fundamentally flawed. The fact that they opened a bug based on them but got shut down should have raised all red flags.<p>When compiling and running a C program, the only thing that matters is &quot;what the C abstract machine does&quot;. Programs that exhibit UB in the abstract machine are allowed to do &quot;anything&quot;.<p>Trying to scope that down using arguments of the form &quot;but what the hardware does is X&quot; are fundamentally flawed, because anything means anything, and what the hardware does doesn&#x27;t change that, and therefore it doesn&#x27;t matter.<p>This blogpost &quot;What The Hardware Does is not What Your Program Does&quot; explains this in more detail and with more examples.<p><a href="https:&#x2F;&#x2F;www.ralfj.de&#x2F;blog&#x2F;2019&#x2F;07&#x2F;14&#x2F;uninit.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.ralfj.de&#x2F;blog&#x2F;2019&#x2F;07&#x2F;14&#x2F;uninit.html</a>