https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54192
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- flag_trapping_math also guards things like /* Don't perform operation if it would raise a division by zero exception. */ if (code == RDIV_EXPR && real_equal (&d2, &dconst0) && (flag_trapping_math || ! MODE_HAS_INFINITIES (mode))) return NULL_TREE; so I guess it differs from -frounding-math also in a way that it doesn't guard FENV access of the exception state (I'd say that is not implemented at all, not even in the -frounding-math way) but it guards whether the FENV state is set to trap? So its default should match the execution environments default? So IMHO we should simply document that -frounding-math is about FENV access (including exception bits) and -fno-trapping-math is about "exceptions" in the C++ sense (aka traps).