From patchwork Wed May 31 20:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 101575 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3146031vqr; Wed, 31 May 2023 13:07:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40F/zYwlyVQ3fdu+WzHFb7uNCk27hRv9XEhajtBBxbRYUCdn7pMT1u7IVzyoVQklJesk7k X-Received: by 2002:aa7:cfd8:0:b0:514:91bd:a967 with SMTP id r24-20020aa7cfd8000000b0051491bda967mr4391614edy.9.1685563652148; Wed, 31 May 2023 13:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685563652; cv=none; d=google.com; s=arc-20160816; b=adNjXH7b2zQfNiJol55UHR5BTggEN9BNVc3sntdq8Bsj7+WLyih0shANxUMQMU0GIB 74wPZxNoeIcqcM759IcGrz6465oZZpF7hjHziJTrv2OkpiGs5fpDSRmspSj3STIgzRO4 AivqJ8flFoHgn0I5ZY7EIobVw0E676HsJlo/+vPltU6nRoQCG02K6V/+tdrIGLw9R0cc 1Wk70fFwePWdguQi3B4nCQF85GTkqb6sN1O64CCSdvNvCrsAg1AYx9v29cfseJZxkuhF H5pQQx+3d/bZ67Lz0xNYb3//+Z/RIzr5cEeAQKhUUJq5Hei1xeufehTphrUtnhNZsz1g UwIA== 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-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=Lpaxm4mz1ZVS6zJC5BFac5S17JVE0ucrSQ+JOyQzH8M=; b=W1w2UWe4LIg8yBmtQ6ZQP8Cfg+b3UYPZj+UbQDQXkAD4k2HugL5WMkXWP4voFSE8Ry sdUVZiGqzzbO9SvbkKVvZe5NI4JZSN3YpKIdBz1fqScXIVnszfWh4oRaaUA8FBo3kgTl k5v59XbH31DU9GtxTQ+OecMHNPXY6lr4YwVFOm6dD0NiC9Is0G1kPAOHY6gxzC3mXvo/ jBDXPeYGwRRL3hOHpfQ+WqhEmn4fDFpePx+AlVhrf1kt08iyymzSgAhLlV7gccKBxWuw 6CH4WqarNwDwJGYhnZl/TKRcUjATkrSZY9rOKJMqRb4vvK7EaZF1VD3C4U0UbmYy+/AT EdNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fb+bnMld; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ay5-20020a056402202500b0051566d8bff4si763977edb.288.2023.05.31.13.07.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 13:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fb+bnMld; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 88B13385660C for ; Wed, 31 May 2023 20:06:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88B13385660C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685563615; bh=Lpaxm4mz1ZVS6zJC5BFac5S17JVE0ucrSQ+JOyQzH8M=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fb+bnMld1278nG2yGWtB9F9LanscEfgr1AbqPO2ByhztPLYHE2FAtXo6hFI3s9dUN HV4IOa6X/4uPBa3/7JWovUFehneKESRcGlush+gt2T+Lubz+xqSsdJI0z6f+4LFsjF xpCsPoo1NpdmMLRpGotP1QSI5M7vQEFGII0fULfI= 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 088BE3858CD1 for ; Wed, 31 May 2023 20:05:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 088BE3858CD1 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-237-2DXKRcuOMqOGvmo7vkLyOA-1; Wed, 31 May 2023 16:05:33 -0400 X-MC-Unique: 2DXKRcuOMqOGvmo7vkLyOA-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 429328032EF; Wed, 31 May 2023 20:05:33 +0000 (UTC) Received: from localhost (unknown [10.42.28.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E672C154D7; Wed, 31 May 2023 20:05:32 +0000 (UTC) To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [committed] libstdc++: Fix build for targets without _Float128 [PR109921] Date: Wed, 31 May 2023 21:05:32 +0100 Message-Id: <20230531200532.6935-1-jwakely@redhat.com> In-Reply-To: <20230531122222.4116868-1-jwakely@redhat.com> References: <20230531122222.4116868-1-jwakely@redhat.com> 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 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely 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?1767441592088016601?= X-GMAIL-MSGID: =?utf-8?q?1767441592088016601?= Tested x86_64-linux. Built msp430-elf and cris-elf. Pushed to trunk. -- >8 -- My r14-1431-g7037e7b6e4ac41 change caused the _Float128 overload to be compiled unconditionally, by moving the USE_STRTOF128_FOR_FROM_CHARS check into the function body. That function should still only be compiled if the target actually supports _Float128. libstdc++-v3/ChangeLog: PR libstdc++/109921 * src/c++17/floating_from_chars.cc: Check __FLT128_MANT_DIG__ is defined before trying to use _Float128. --- libstdc++-v3/src/c++17/floating_from_chars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc index eea878072b0..f1dd1037bf3 100644 --- a/libstdc++-v3/src/c++17/floating_from_chars.cc +++ b/libstdc++-v3/src/c++17/floating_from_chars.cc @@ -1325,7 +1325,7 @@ _ZSt10from_charsPKcS0_RDF128_St12chars_format(const char* first, __ieee128& value, chars_format fmt) noexcept __attribute__((alias ("_ZSt10from_charsPKcS0_Ru9__ieee128St12chars_format"))); -#else +#elif defined(__FLT128_MANT_DIG__) from_chars_result from_chars(const char* first, const char* last, _Float128& value, chars_format fmt) noexcept