Losing the magic
Losing the magic
Posted Dec 7, 2022 19:48 UTC (Wed) by pizza (subscriber, #46)In reply to: Losing the magic by Wol
Parent article: Losing the magic
The thing is... they are! Run GCC without any arguments and you'll get -O0, ie "no optimization".
These UB-affected optimizations are only ever attempted if the compiler is explicitly told to try.
Now what I find hilarious are folks who complain about the pitfalls of modern optimization techniques failing on their code while simultaneously complaining "but without '-O5 -fmoar_ponies' my program is too big/slow/whatever". Those folks also tend to ignore or disable warnings, so.. yeah.