From patchwork Sat Nov 12 08:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 19130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1178806wru; Sat, 12 Nov 2022 00:48:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5t2vxvM/DH0YmyxshYGDumAuMqPPWSmnW98v7evdAU1vDP9p68OMVTiC8/JAY0dc2P3EGA X-Received: by 2002:a17:906:a046:b0:741:5c0e:1058 with SMTP id bg6-20020a170906a04600b007415c0e1058mr4551852ejb.472.1668242900688; Sat, 12 Nov 2022 00:48:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668242900; cv=none; d=google.com; s=arc-20160816; b=k+zUI6cP8HE9T2KrdlHYoFZ5M69k6NvrAp3RDi0nN2IN8kWUHINapLKIS2PUtIlv5y UOCWF+HQzd6v9Pmm9VPzppJZwzmYHA4mewHQr0XWK++PMSW8G2C+gVBAIhwdxGlXEUtC ueR9q9ZBCzNrO4D03F3ONj7UUh9zJEkGCLl9hDQPXTwzryrA3sGRwmuQu4GZxyteNEsC RwYhuC1+72y8XFknooEpsPhCVGwNqKORmdGqswsBLddDwjkYMwKvIjzEDORnYqfyGvsT AJcTemkst9EfkVhNJ9jb6GVJ6fGZqr+mcqu1NNLYqvH6DN5m4WvfsDs7WVMCb7mY8itG 6McQ== 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:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=bej56umRQ7a7V0EiaZ653uKC601ou5S87k+c2opdbBI=; b=bsHzB+Tfzq5hzyk8onftRdq3dpp0cyaxvHfA1L5DxnVDFyA4jIiLejv7Cci+4EnQKr s0D4Tn5lTjOexSbEcM9v2364AkQRfvmaBlwlsSz1HskGWHBS+bk1cwUr8VgQ38YMKUt2 zS4L9+be0kc/jz3l1WZXlLumsqz7Ns0V/bISm+i9wD45C5kJJW/FO+steypcBY+LJdzd nTjt0w0PlQ0moNHWWp5K3uG1t4T3ZCHKAOaTehEWFTW2snT0qnBtBYrKyO5qZskUjcVi N3pbW8dUQRRuRcwzxcvsbOgVN+TP2TX27o5ZR/q+IgK+fAeWNergAcoGCJ2JqnhdZmPL rkhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=RdZKy6Dc; 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 m21-20020a056402431500b00461bbc0f917si4668221edc.605.2022.11.12.00.48.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 00:48:20 -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=RdZKy6Dc; 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 608BC3885503 for ; Sat, 12 Nov 2022 08:48:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 608BC3885503 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668242895; bh=bej56umRQ7a7V0EiaZ653uKC601ou5S87k+c2opdbBI=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=RdZKy6DcQ0J4BsdyOq3zeDUJqqK7+PfRGmt9dbUgf9FbxI9tQpVYwUApgUf3dSIo3 KyNTkhT7JQTMDK/34TzT7x0902jPSRmtqDnqSahr2ACJM84WNHw3R6WgIVbovbJDQf 9wBdT+pLDBZHcxGmf/JyG8ZkBkhcIKPB/fXWJC0U= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 3AA603858032 for ; Sat, 12 Nov 2022 08:47:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3AA603858032 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-_IvgUNz7Oh2VDiYSfs2Qhw-1; Sat, 12 Nov 2022 03:47:20 -0500 X-MC-Unique: _IvgUNz7Oh2VDiYSfs2Qhw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67D99811E67; Sat, 12 Nov 2022 08:47:20 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27FF5C15BA4; Sat, 12 Nov 2022 08:47:20 +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 2AC8lFKZ945902 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 12 Nov 2022 09:47:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AC8lFX4945901; Sat, 12 Nov 2022 09:47:15 +0100 Date: Sat, 12 Nov 2022 09:47:14 +0100 To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [PATCH] libstdc++: Fix up to_chars ppc64le _Float128 overloads [PR107636] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable 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?1749279468026165145?= X-GMAIL-MSGID: =?utf-8?q?1749279468026165145?= Hi! As reported, I've misplaced __extension__ keywords in these cases (wanted not to have them on the whole inlines because _Float128 is completely standard now while __float128 is not, but before return it is a syntax error. I've verified on a short testcase that both g++ and clang++ accept __extension__ after return keyword. Bootstrapped/regtested on x86_64-linux and i686-linux (admittedly not powerpc64le-linux with new glibc), ok for trunk? 2022-11-12 Jakub Jelinek PR libstdc++/107636 * include/std/charconv (to_chars): Fix up powerpc64le _Float128 overload __extension__ placement. Jakub --- libstdc++-v3/include/std/charconv.jj 2022-11-11 08:15:45.696183293 +0100 +++ libstdc++-v3/include/std/charconv 2022-11-11 16:32:52.992693605 +0100 @@ -892,23 +892,25 @@ namespace __detail inline to_chars_result to_chars(char* __first, char* __last, _Float128 __value) noexcept { - __extension__ - return to_chars(__first, __last, static_cast<__float128>(__value)); + return __extension__ to_chars(__first, __last, + static_cast<__float128>(__value)); } inline to_chars_result to_chars(char* __first, char* __last, _Float128 __value, chars_format __fmt) noexcept { - __extension__ - return to_chars(__first, __last, static_cast<__float128>(__value), __fmt); + + return __extension__ to_chars(__first, __last, + static_cast<__float128>(__value), __fmt); } inline to_chars_result to_chars(char* __first, char* __last, _Float128 __value, chars_format __fmt, int __precision) noexcept { - __extension__ - return to_chars(__first, __last, static_cast<__float128>(__value), __fmt, - __precision); + + return __extension__ to_chars(__first, __last, + static_cast<__float128>(__value), __fmt, + __precision); } #else to_chars_result to_chars(char* __first, char* __last, _Float128 __value)