From patchwork Thu Feb 9 16:20:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 55043 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp430117wrn; Thu, 9 Feb 2023 08:21:43 -0800 (PST) X-Google-Smtp-Source: AK7set8zr2ORNLKxdPe0Hp0d7ivGz/koYLy58tSXxM4mWK/orZ8Xp6JnjAM5ttEpN/TnAlEoxkxN X-Received: by 2002:a50:a402:0:b0:4ab:554:37e9 with SMTP id u2-20020a50a402000000b004ab055437e9mr7900434edb.41.1675959703230; Thu, 09 Feb 2023 08:21:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675959703; cv=none; d=google.com; s=arc-20160816; b=xdZ1RziVqaNjEdBvHPeLZC+nRm57vo1obfVf2De4DTY0pRy6ll6i/i3MBbH4zHV3tC lFzdrbXNjtmty9WQXkZ4hIMvcg24wL16MyVdankzINoJuIniEgsaivfy/b+TVYq5cRjN VjztD2w1Gs02AI6evpAE4bhJ9MV9cYV8VkLXCF2h0xXo6W7Xr0JArZv7TYDxmnQMmr73 wBQvBwh+xnVsATPiA8/BeF3hKuc63UGtX4akTlJPLWOM/u9lwVP5aB2y/weWivQsWdFy OVUoYmFig/2JjHW2VHEoNGHIO6TI68SF2Vk7ecgKS3mLwsaW72+zTV0t9nmTTAvLhTUy YHNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=D44J8R59HM/ErNo52aXMciB7lOQQoTyKnzCuvilRz8Q=; b=AS4kSwp2syxUkDABnSqz5zyGAu3h251T44tPR07ueHGC8fiz4OlvNs91kw8i0rD9Qp zE8N27WI+nfyQ07OwSwdzlDe6kmpTXjZqv93flgUpDryeaN3Gmng2t42koDLRQ2d+jhX B7bXCQF0OngEhap3Amr3KnqEcDCKNgR8qQg6blNq1O2yle7zBvGY1tPmHN0PCwoCkcIc /0suvd5jh2n9VLzbFkM+NLgooBlIb9Yf5r/8d9gWqsaUTEZEV0RARujCENUHGYQEhIm7 z4ujgRI15igoJtIqisSGT3Ep4H+bj32+HY8eeGOeuNw3tHuhJ+gxieoYjWcQZxzdtQsb R3TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oLf6Nqpy; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m23-20020aa7d357000000b004aad8d44329si2098671edr.524.2023.02.09.08.21.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 08:21:43 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oLf6Nqpy; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 392593858423 for ; Thu, 9 Feb 2023 16:21:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 392593858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675959702; bh=D44J8R59HM/ErNo52aXMciB7lOQQoTyKnzCuvilRz8Q=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=oLf6NqpysM91B4r9rL8NujZbXxVziKAAFM4Jo7h3C9Y0ktfsdRa/Bh4xbyTsi90Xw QKv20aLDFOP0PzvWgjcbXnqpXeTcCI7oRyKo2mC0ZuM7TlDeA0vJmCmxoC8pX3nV6z 33twSNQ3KFdm5h/5kRumNBocHfhscuD00TPdQ490= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9FE143858C50 for ; Thu, 9 Feb 2023 16:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FE143858C50 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-389-kcqi7WnlPMiqoOBk1S13vQ-1; Thu, 09 Feb 2023 11:20:54 -0500 X-MC-Unique: kcqi7WnlPMiqoOBk1S13vQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D82C3C0E462; Thu, 9 Feb 2023 16:20:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AFA31121314; Thu, 9 Feb 2023 16:20:54 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 319GKpir4060595 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 9 Feb 2023 17:20:52 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 319GKolT4060594; Thu, 9 Feb 2023 17:20:50 +0100 Date: Thu, 9 Feb 2023 17:20:50 +0100 To: gcc-patches@gcc.gnu.org, Gerald Pfeifer Subject: [wwwdocs] gcc-13/changes.html: Document C++ -fexcess-precision=standard Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757371121808221137?= X-GMAIL-MSGID: =?utf-8?q?1757371121808221137?= Hi! Martin Liska mentioned that porting_to.html doesn't mention the C++ excess precision changes. Not really sure if porting_to should document those, but I think changes.html certainly should. And perhaps porting_to could have some examples and link to this spot in changes. Ok for wwwdocs? Jakub --- a/htdocs/gcc-13/changes.html +++ b/htdocs/gcc-13/changes.html @@ -230,6 +230,21 @@ a work-in-progress.

C++

    +
  • Excess precision support (which has been available in C since GCC 4.5) + has been implemented for C++ as well. It is enabled by default + in strict standard modes like -std=c++17, where it + defaults to -fexcess-precision=standard, while in GNU + standard modes like -std=gnu++20 it defaults to + -fexcess-precision=fast. The option affects mainly + IA-32/x86-64 where when defaulting to x87 math and in some cases on + Motorola 68000 float and double expressions + are evaluated in long double precision and S/390, System z, + IBM z Systems where float expressions are evaluated in + double precision. Also, on several architectures where + std::float16_t or std::bfloat16_t types + are supported those are evaluated in float precision. + -fexcess-precision=fast restores previous behavior. +
  • Several C++23 features have been implemented: