From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 914273858039 for ; Sat, 12 Nov 2022 08:47:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 914273858039 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668242842; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=bej56umRQ7a7V0EiaZ653uKC601ou5S87k+c2opdbBI=; b=GYiYskd+qgWg4RFDt1rXrbUqotMM7IRcukn9TyXe1wBIvn1ZBiSTEfiR+eNJmt8i1rIbQ3 ewyHl8Uh+5BFANLKLRqcALeI26DSbC9ssCsLoiQC8hyHpS+5Yef9LHXHii9I0hKM4QhkVC QJr5a396P/VF9yDq5tCLIKeXNUQwabw= 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 From: Jakub Jelinek 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: Reply-To: Jakub Jelinek 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-Type: text/plain; charset=us-ascii 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=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: 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. --- 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) Jakub