Y
Hacker News
new
|
ask
|
show
|
jobs
by
loeg
455 days ago
-O3 doesn't cause undefined behavior.
1 comments
MyOutfitIsVague
455 days ago
No, but it can often expose undefined behavior that doesn't stop a program from "working" on lower optimization levels.
Which is why I'm in support of always building your own software with -O3.
link
vlovich123
455 days ago
Are you sure about that? I’m not aware of any additional UB exploitation enabled by O3 vs O2 or Os.
link
MyOutfitIsVague
455 days ago
Nope, I'm not sure about it. I remember when I was using Gentoo about 10 years ago, this was the common reason given for using -O2 instead of -O3 in your build flags, and I'm just speaking from that memory.
link
vlovich123
454 days ago
Yeah there’s lots of cargo culting FUD like that that happens (see other posters in this thread that claim that glibc is a more stable allocator )
link
Which is why I'm in support of always building your own software with -O3.