[Bug target/55522] -funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 7 10:06:44 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522

--- Comment #15 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #13)
> Patient: Doctor it hurts when I do this.
> Doctor: then don't do that and if you read the instructions I gave you I
> told you I would hurt this way.
> 

The problem I see with this analogy, is who exactly is the doctor in this
situation? It seems that currently the doctor is the GCC devs, but I think the
situation could be improved by having GCC itself be the doctor, by implementing
a -Wfast-math warning flag or something to make the issues with -ffast-math
more known. Having it documented in the instructions is just one place; it
should be mentioned in all the relevant places that a user might check.


More information about the Gcc-bugs mailing list