logoalt Hacker News

mafuyyesterday at 12:34 PM1 replyview on HN

I'm not sure that's right. For instance, the Pentium 4 spec explicitly says unaligned int32 loads take longer. And x86/x64 is very gentle in that regard, other archs would whip you. So an unaligned int access is rightfully treated differently. It should be IB.

Just creating the pointer, though, should not be UB, even though it apparently is. It should not even be IB.


Replies

simonaskyesterday at 1:09 PM

Also, it’s been way more than a decade since Pentium 4 was remotely relevant.