Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-11 Thread Ulrich Weigand
Joseph Myers wrote: > On Mon, 10 Feb 2020, Ulrich Weigand wrote: > > I'm not sure how this can be implemented in the current option handling > > framework. The -ffast-math handling case would have to check whether > > or not there is any explicit use of -f(no-)finite-math-only; is there > > any in

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-10 Thread Joseph Myers
On Mon, 10 Feb 2020, Ulrich Weigand wrote: > Given the above rule, in the last case __FINITE_MATH_ONLY__ should > also be 0, right? Yes. > I'm not sure how this can be implemented in the current option handling > framework. The -ffast-math handling case would have to check whether > or not ther

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-10 Thread Ulrich Weigand
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 *m

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-10 Thread Ulrich Weigand
Joseph Myers wrote: > On Fri, 7 Feb 2020, Ulrich Weigand wrote: > > > 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. > > Yes, that's c

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Segher Boessenkool
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

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Joseph Myers
On Fri, 7 Feb 2020, Ulrich Weigand wrote: > 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. Yes, that's correct. (There are cases where it

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Ulrich Weigand
Richard Biener wrote: > On Fri, Jan 31, 2020 at 6:01 PM Ulrich Weigand wrote: > > The overall effect of this patch is that now all component flags of > > -ffast-math are treated exactly equivalently: > > * they are set (changed from their default) with -ffast-math > > * they are reset to their

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-05 Thread Richard Biener
On Fri, Jan 31, 2020 at 6:01 PM Ulrich Weigand wrote: > > Hello, > > we've noticed some inconsistencies in how the component flags of -ffast-math > are handled, see the discussion on the GCC list starting here: > https://gcc.gnu.org/ml/gcc/2020-01/msg00365.html > > This patch fixes those inconsist

[PATCH] Fix -ffast-math flags handling inconsistencies

2020-01-31 Thread Ulrich Weigand
Hello, we've noticed some inconsistencies in how the component flags of -ffast-math are handled, see the discussion on the GCC list starting here: https://gcc.gnu.org/ml/gcc/2020-01/msg00365.html This patch fixes those inconsistencies. Specifically, there are the following changes: 1. Some comp