Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-29 Thread Ulrich Weigand
Joseph Myers wrote: > On Tue, 28 Jan 2020, Ulrich Weigand wrote: > > > The following patch (not yet fully tested) implements the above changes. > > Note that this now brings the set of flags set and reset by > > set_fast_math_flags completely in sync with the set of flags > > tested in

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-28 Thread Joseph Myers
On Tue, 28 Jan 2020, Ulrich Weigand wrote: > The following patch (not yet fully tested) implements the above changes. > Note that this now brings the set of flags set and reset by > set_fast_math_flags completely in sync with the set of flags > tested in fast_math_flags_set_p. > > Does this make

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-28 Thread Ulrich Weigand
Joseph Myers wrote: > On Mon, 27 Jan 2020, Ulrich Weigand wrote: > > I see. I guess that makes me wonder what -fno-fast-math *ever* does > > (except canceling a -ffast-math earlier on the command line). Looking > > at the current code, -fno-fast-math (just like -ffast-math) only ever > > sets

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-27 Thread Joseph Myers
On Mon, 27 Jan 2020, Ulrich Weigand wrote: > I see. I guess that makes me wonder what -fno-fast-math *ever* does > (except canceling a -ffast-math earlier on the command line). Looking > at the current code, -fno-fast-math (just like -ffast-math) only ever > sets flags whose default is not

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-27 Thread Ulrich Weigand
Joseph Myers wrote: > On Tue, 21 Jan 2020, Ulrich Weigand wrote: > > > It looks like there's multiple cases here. For the two flags > > -fassociative-math and -freciprocal-math, it seems to have happened just as > > you describe: they were created (split out of -funsafe-math-optimizations) > >

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-21 Thread Joseph Myers
On Tue, 21 Jan 2020, Ulrich Weigand wrote: > It looks like there's multiple cases here. For the two flags > -fassociative-math and -freciprocal-math, it seems to have happened just as > you describe: they were created (split out of -funsafe-math-optimizations) > in commit

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-21 Thread Ulrich Weigand
Joseph Myers wrote: > On Mon, 20 Jan 2020, Ulrich Weigand wrote: > > > This has the effect that e.g. after > > > > -ffast-math -fno-finite-math-only > > > > the __FAST_MATH__ macro is no longer predefined, but after > > > > -ffast-math -fno-associative-math > > > > the __FAST_MATH__ macro

Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-20 Thread Joseph Myers
On Mon, 20 Jan 2020, Ulrich Weigand wrote: > This has the effect that e.g. after > > -ffast-math -fno-finite-math-only > > the __FAST_MATH__ macro is no longer predefined, but after > > -ffast-math -fno-associative-math > > the __FAST_MATH__ macro still *is* predefined, even though both >

fast_math_flags_set_p vs. set_fast_math_flags inconsistency?

2020-01-20 Thread Ulrich Weigand
Hello, the -ffast-math command line option sets a bunch of other flags internally, as implemented in set_fast_math_flags. It is possible to selectively override those flags on the command line as well. I'm now wondering under what circumstances the __FAST_MATH__ macro should still be defined.