Segher Boessenkool wrote: > On Fri, Feb 07, 2020 at 05:47:32PM +0100, Ulrich Weigand wrote: > > > but what happens to -fsignalling-nans -ffast-math then? Better leave > > > those > > > in I'd say. > > > > Ah, it seems I was confused about the intended semantics here. > > > > I thought that a *more specific* option like -fsignalling-nans was always > > intended to override a more generic option like -ffast-math, no matter > > whether it comes before or after it on the command line. > > -fsignaling-nans is an independent option. Signaling NaNs don't do much > at all when you also have -ffinite-math-only, of course, which says you > don't have *any* NaNs.
That's a good point, thanks for pointing this out! I agree that -fsignaling-nans is not a good example then; it really should be independent of -ffast-math. However, there's still one other option that has a similar issue: -frounding-math. This *is* properly related to -ffast-math, in that -ffast-math really ought to imply -fno-rounding-math, but the latter is (currently) also the default in GCC. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain ulrich.weig...@de.ibm.com