From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3792 invoked by alias); 27 Jan 2020 20:20:15 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3777 invoked by uid 89); 27 Jan 2020 20:20:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=Looking X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Jan 2020 20:20:13 +0000 IronPort-SDR: h+oVpym/j44JK160zcpYQV5gEnkFT4QyQnh5BW5bZABi7Xm1xOmdD90m7/30jsMzz3uJuhnNjC f43FseeqIczLzQqO6FHgLfdCJ7QlBzHHSCNjUFbClyOaB9UwsJpFpCOb7suoEKuXkqP5LPMHGN WzXEs9618hT/a+10sOeBR8ymJn7Os7hS2cpeaRVg8zX5HbrmmDpi75km33XBicjFnd25d0RFf0 zpsABuUZQeM8sVWSlc5R+VAUpak5CFINEJ2cFr/ZUnZwuV5VlJf3KjRTFOygK+LoJg/Jilwre6 0MQ= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 27 Jan 2020 12:20:11 -0800 IronPort-SDR: Aw/rWbcdu0RwgzC09z7/HXXAYDPMPywucov1I+pDmZN1iGSPNlOO3H83FKzAnE7elIQGyGunkl Cr1qr+FZpUXQ== Date: Tue, 28 Jan 2020 17:19:00 -0000 From: Joseph Myers To: Ulrich Weigand CC: Subject: Re: fast_math_flags_set_p vs. set_fast_math_flags inconsistency? In-Reply-To: <20200127182612.63BE1D803D2@oc3748833570.ibm.com> Message-ID: References: <20200127182612.63BE1D803D2@oc3748833570.ibm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-Path: joseph@codesourcery.com X-SW-Source: 2020-01/txt/msg00477.txt.bz2 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 overridden on the command line, but > then it always sets them to their default value! As a general principle, more specific flags take precedence over less specific ones, regardless of the command-line order. So it's correct for -ffast-math and -fno-fast-math not to do anything with a flag that was explicitly overridden by the user (modulo any issues where a particular combination of flags is unsupported by GCC, as with the "%<-fassociative-math%> disabled; other options take precedence" case in toplev.c). -- Joseph S. Myers joseph@codesourcery.com