From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamza.pair.com (hamza.pair.com [209.68.5.143]) by sourceware.org (Postfix) with ESMTPS id A20E2385843E for ; Thu, 9 Mar 2023 07:09:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A20E2385843E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=pfeifer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pfeifer.com Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id 69D9B33E60; Thu, 9 Mar 2023 02:09:04 -0500 (EST) Received: from naga.localdomain (188-23-63-229.adsl.highway.telekom.at [188.23.63.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hamza.pair.com (Postfix) with ESMTPSA id C3F0B33E56; Thu, 9 Mar 2023 02:09:03 -0500 (EST) Date: Thu, 9 Mar 2023 08:09:02 +0100 (CET) From: Gerald Pfeifer To: Jakub Jelinek cc: =?ISO-8859-15?Q?Martin_Li=A8ka?= , gcc-patches@gcc.gnu.org Subject: Re: [wwwdocs] gcc-13/porting_to.html: Document C++ -fexcess-precision=standard In-Reply-To: Message-ID: <1a4e7d15-0bb8-d083-e168-0a9cc6b38584@pfeifer.com> References: <541d2859-4029-3a21-e57e-10a401c5d226@pfeifer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: mailmunge 3.11 on 209.68.5.143 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,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 Thu, 2 Mar 2023, Jakub Jelinek wrote: > --- a/htdocs/gcc-13/porting_to.html > +++ b/htdocs/gcc-13/porting_to.html > +

GCC 13 implements in C++ excess precision support > +which has been implemented just in the C front-end before. The new behavior is > +enabled by default in -std=c++NN modes and when > +FLT_EVAL_METHOD is 1 or 2 affects behavior of floating point ^^^^^^ > +constants and expressions. E.g. for FLT_EVAL_METHOD equal > +to 2 on ia32: : > +will not abort with standard excess precision, because constants and expressions > +in float or double are evaluated in precision of > +long double and demoted only on casts or assignments, but will > +abort with fast excess precision, where whether something is evaluated in > +precision of long double or not depends on what evaluations are > +done in the i387 floating point stack or are spilled from it. > + > +The -fexcess-precision=fast option can be used to request the > +previous behavior. I struggled a bit understanding this and so have come up with what I hope is simpler (without changing the meaning). What do you think of the change below? Gerald diff --git a/htdocs/gcc-13/porting_to.html b/htdocs/gcc-13/porting_to.html index 170da096..8a2822ff 100644 --- a/htdocs/gcc-13/porting_to.html +++ b/htdocs/gcc-13/porting_to.html @@ -122,12 +122,14 @@ the operand as an lvalue.

Excess precision changes

-

GCC 13 implements in C++ excess precision support -which has been before implemented just in the C front end. The new behavior is -enabled by default in -std=c++NN modes and e.g. when -FLT_EVAL_METHOD is 1 or 2 affects behavior of floating point -constants and expressions. E.g. for FLT_EVAL_METHOD equal -to 2 on ia32: +

GCC 13 implements excess precision +support, which was implemented just in the C front end +before, in C++. The new behavior is enabled by default in +-std=c++NN modes and when +FLT_EVAL_METHOD is 1 or 2 and affects the behavior of +floating point constants and expressions.

+ +

E.g. for FLT_EVAL_METHOD equal to 2 on ia32


 #include <stdlib.h>
@@ -139,11 +141,11 @@ will not abort with standard excess precision, because constants and expressions
 in float or double are evaluated in precision of
 long double and demoted only on casts or assignments, but will
 abort with fast excess precision, where whether something is evaluated in
-precision of long double or not depends on what evaluations are
-done in the i387 floating point stack or are spilled from it.
+long double precision depends on what evaluations are
+done in the i387 floating point stack or are spilled from it.

-The -fexcess-precision=fast option can be used to request the -previous behavior. +

The -fexcess-precision=fast option can be used to +request the previous behavior.

allocator_traits<A>::rebind_alloc<A::value_type> must be A