top | item 46139056

(no title)

nickelpro | 2 months ago

You're an expert, you're overestimating the competence of the median programmer.

That's a great bug you found, and of course it is a compiler bug, not UB.

99.9% of the bugs I've dealt with of this sort were just pointer aliasing. Or just use-after-free. Or just buffer overruns.

The median programmer, especially in the good ol' days, wrote UB code about once every 6-10 hours.

discuss

order

uecker|2 months ago

Sure. All I am saying is that there are still plenty of compiler bugs related to optimization, which is reason enough for me to recommend being careful with optimization in contexts where correctness is important.