-ffast-math
is more about selectively bypassing IEEE/ISO standard restrictions than it is to not care about precision.
On the contrary, you care more about precision than standard restrictions, and that’s why you disable them. This involves reordering, fusion, rounding, denormals, signals all of which are standard specific (extra cautious safety concerns, etc) and not related to the maths they’re trying to represent.
That’s why -Ofast
exists, to create “faster” non-conforming programs, which in itself, it’s a valid proposition, and it’s documented, so becomes “user error”.
My argument above was just what kind of thing we want to put into -Ofast
from our side, and the answer has always intentionally been: “what we feel comfortable with”, not “whatever GCC does”.
Or, if we disable the flag altogether, that’s also a clear message, which has its own merits. But as seen in this thread, there are some very valid uses of -Ofast
, so perhaps not the most user-friendly alternative.
I would continue to have -Ofast
with the options we’re comfortable with, and let the community decide how to handle the foot guns in separate.