On Tue, Apr 04, 2023 at 11:02:53AM +0200, Florian Weimer wrote:
* Zbigniew Jędrzejewski-Szmek:
> And -Ofast is not something that can be enabled as a default build flag,
> because it leads to surprising and unpredictable behaviour in some
> cases. (*)
I assume (*) refers to the the strange-action-at-distance issue. It was
recently fixed in GCC:
--funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared
<
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522>
I had something different in mind: -Ofast implies -ffast-math which implies
-ffinite-math-only, i.e. no NaNs or Infs in floating point calculations
(and other effects).
https://simonbyrne.github.io/notes/fastmath/
Zbyszek