Re:Decreasing the Number of Memory Accesses 1/2
by RobotToaster on Friday March 31, 2023 @08:29AM
(#35386071)
GCC already has flags for various "dangerous" optimisation options (ffast-math for instance), there's no reason you couldn't have similar options that are disabled by default.
I don't blame the compiler guys. They have to deal with tortuously complex real-world code. Sight unseen. And that code may only work correctly because of some unwritten assumptions, side-effects, and undefined behaviors, which no good program would ever rely upon.