From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id A36BC3858C60 for ; Mon, 18 Sep 2023 11:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A36BC3858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 6339340F1DF9; Mon, 18 Sep 2023 11:43:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 6339340F1DF9 Date: Mon, 18 Sep 2023 14:43:21 +0300 (MSK) From: Alexander Monakov To: Jakub Jelinek cc: Martin Uecker , Richard Biener , Florian Weimer , gcc@gcc.gnu.org Subject: Re: Concerns regarding the -ffp-contract=fast default In-Reply-To: Message-ID: <2ef1dbd0-8a67-6a25-50e3-16c7ca3676b6@ispras.ru> References: <87r0n01z18.fsf@oldenburg3.str.redhat.com> <21e46cef-1fbf-df87-608d-52b7f894dea7@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 18 Sep 2023, Jakub Jelinek wrote: > Perhaps we should add some initial hammer approach for the pragma, like > if you ever use the pragma to turn it somewhere off, it is turned off > globally, or ditto per function. Might be far easier than trying to > make it precise that contraction is allowed in this expression and not in > this subexpression of that etc. Of course, making it precise is the > ultimate goal. When implementing -ffp-contract=standard I looked into implementing the pragma (in a precise manner) and I didn't get the impression it would be hard to implement for C. But I was somewhat discouraged by the lack of front-end maintainers reaction to the patch implementing the =standard, so I didn't pursue that. The hardest part would be popping the pragma state when leaving a block, which didn't seem difficult (at least for C). Alexander