Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

UB is not impossible; I think the author is being a little cheeky there. But the standard does grant compilers extreme liberties as far as how they deal with programs which can execute UB. LLVM's choice of what to do with that liberty, in this case, seems to be to assume the UB is unreachable and continue legally optimizing the program under that assumption. That's not a wrong assumption according to the definition of C.

It's debatable whether it's a good assumption. But not wrong.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: