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

True, only executions of a program that exhibit undefined behavior are affected. But the moment it is clear a program will exhibit undefined behavior, the compiler is already allowed to do whatever it wants. So if 20 lines below an important function call you will certainly call a function that will certainly cause undefined behavior, the important function call can be already be left out.


And the compiler could insert additional side effect free computations ahead of time to detect if an execution will hit UB later on.




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

Search: