Undefined behaviour is a complex issue, but compiler devs seem alarmingly unaware that optimising for performance is one choice among many.
-
-
Replying to @stephenrkell
@stephenrkell I don't see unawareness at all here. They have ubsan, language dialect options to allow common mistakes, etc.1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker Okay, but the bottom line is still: "your bugs => your problem; UB = optimisation opportunity". How about "-Oonly-known-good"?1 reply 0 retweets 0 likes -
Replying to @stephenrkell
@stephenrkell A safety/hardening-oriented -O level would probably be welcome if someone wants to develop it.1 reply 0 retweets 0 likes -
Replying to @RichFelker
@stephenrkell However lots of UB is nearly as dangerous even without optimizations that actively 'exploit' it. It's undefined for a reason.1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker I'd say "many reasons", which is why this issue is so complex... (hmm, perhaps I should blog about this soonish).1 reply 0 retweets 0 likes -
Replying to @stephenrkell
@stephenrkell Also, if you write a proper optimizing compiler, you have to go out of your way NOT to "exploit UB" or else badly pessimize.3 replies 0 retweets 0 likes
@stephenrkell And remember, if your compiler generates "inefficient" code ppl will write all sorts of UB hacks to "improve" the output.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.