From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50384 invoked by alias); 20 Jan 2020 18:42:30 -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 50375 invoked by uid 89); 20 Jan 2020 18:42:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=all, all!, selectively, *is* X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jan 2020 18:42:28 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00KIcsKf014917 for ; Mon, 20 Jan 2020 13:42:27 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xmfy126ky-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 20 Jan 2020 13:42:26 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jan 2020 18:42:25 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 20 Jan 2020 18:42:23 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00KIgLVC47186296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jan 2020 18:42:22 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E584D11C052; Mon, 20 Jan 2020 18:42:21 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D316411C04C; Mon, 20 Jan 2020 18:42:21 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.214.28]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 20 Jan 2020 18:42:21 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 55034D80344; Mon, 20 Jan 2020 19:42:21 +0100 (CET) Subject: fast_math_flags_set_p vs. set_fast_math_flags inconsistency? To: gcc@gcc.gnu.org, joseph@codesourcery.com Date: Tue, 21 Jan 2020 14:52:00 -0000 From: "Ulrich Weigand" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 20012018-0016-0000-0000-000002DF2708 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20012018-0017-0000-0000-00003341CC14 Message-Id: <20200120184221.55034D80344@oc3748833570.ibm.com> X-SW-Source: 2020-01/txt/msg00369.txt.bz2 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. This is currently implemented in the fast_math_flags_set_p routine, which checks the status of *some* (but not all!) of the flags implied by -ffast-math. 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 -ffinite-math-only and -fassociative-math are implied by -ffast-math. Is this deliberate? (If so, is it documented somewhere?) Or is this just a bug and fast_math_flags_set_p ought to check all flags implied by -ffast-math? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com