logoalt Hacker News

tsukikagetoday at 12:31 PM1 replyview on HN

“Implementation defined behaviour”: compiler author chooses, and documents the choice.

A lot of UB should be implementation defined behaviour instead; this would much better match programmers’ intuitions as they reason about their code - you can even see it in the comments of this post: it’s always things like “this hardware supports / doesn’t support unaligned accesses”, it’s never nasal demons.


Replies

tardedmemetoday at 3:02 PM

I told someone at a conference that UB actually means "implementation-defined, no documentation required". He started to refute me and then stopped.

show 2 replies