Hacker News new | ask | show | jobs
by steveklabnik 627 days ago
UB has nothing to do with what the compiler emits. It's undefined behavior because the language says it's undefined behavior.

That said, "what may happen in practice" can be an interesting question, but any answer cannot be relied on to be the case, because it may change at any time. Looks like my sibling already gave you a possible thing that may happen.