← Back to context

Comment by flohofwoe

10 hours ago

> Of course, this exchange just demonstrates the larger point, that even a world-class expert in low level programming can easily make mistakes in spotting potential UB.

A "world-class expert in low level programming" knows that unaligned memory accesses are no problem anymore on most modern CPUs, and that this particular UB in the C standard is bogus and needs to fixed ;)

… it’s only UB if the pointer is actually misaligned. It’s not possible to tell from these two lines whether that’s the case.