logoalt Hacker News

sham1 • today at 5:25 PM • 0 replies • view on HN

Whenever something is undefined behaviour or not is a matter of the standard and what the implementation may or may not have defined for that is immaterial to that. As far as the standard is considered, when they encounter UB, you no longer have a valid C program. However the compiler can still choose to do something with it, which in this particular case manifests as GCC has documented it, but some other compiler can do something else for it.