Hacker News new | ask | show | jobs
by orodley 3359 days ago
Because the useful types of optimisation around undefined behaviour aren't: "we can prove that your program definitely contains undefined behaviour, so we'll compile it into 'rm -rf /', mwahahaha" but rather: "if property P about your program is false, then it would definitely contain undefined behaviour, therefore P must be true" followed by using P to do useful optimisations.

This applies even when your original program contains zero undefined behaviour. Warning here isn't useful.