On Wed, 25 Nov 2020, Richard Biener via Gcc wrote: > > Hello, > > > > let me just mention the old > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53805 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806 > > > > There has been some debate about the exact meaning of -ftrapping-math, but > > don't let that stop you. > > My interpretation has been that GCC considers traps not observable > unless you compile with -fnon-call-exceptions which means that GCC
-ftrapping-math is primarily about raising exception flags (the only form of floating-point exception handling supported in ISO C), not traps in the sense of change of control flow. But it's true that GCC tends to do more moving flag raising (by virtue of not modelling the side effects) than eliminating it, and more eliminating it (at least in the case of apparently dead code, again since the side effects are not modelled) than introducing extra flag raising that doesn't occur in the abstract machine. -- Joseph S. Myers jos...@codesourcery.com