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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 44F11386F478 for ; Mon, 21 Dec 2020 17:07:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 44F11386F478 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-4rSumTT3Nx2kO_HZD85f2A-1; Mon, 21 Dec 2020 12:07:00 -0500 X-MC-Unique: 4rSumTT3Nx2kO_HZD85f2A-1 Received: by mail-qk1-f199.google.com with SMTP id a17so9201531qko.11 for ; Mon, 21 Dec 2020 09:07:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=TlYQg8pOeTvo+r+l3eujpDNIMgp0G6tbWs1VLQY+zMA=; b=SvkSqXVEI5Sn7HNkoTKWBo1/rwUIhx9nUVw+4hcT7FE6TARI2BzphKXnfmJkRkxDDR 8ZzMCmnyfQyQRhtTCHvVZ5r9/sd5z0Eotj7FbIip00zvURW5BaEAFfO1PdPdZU7kQ0Or AGHxFDwZRvnv5zvhUdxS1aEEC8JfFaMsVrqmKYvO2SBx2KotmJ7bp/C9eu5MI5s1LeR9 BTzH6nZAFQ/PRXxZoJGU6zEHa0nPCsp8RRt9puPS6tX2/GbZDrOJF+BWaV5H80X6eZy7 Q0tAd+s3u0mjBDEMbUThiXxOaw7tx6qxQaPJ3XH88SV9uH1LLbZ2vbgNwIJYhxxrHCFC DWvw== X-Gm-Message-State: AOAM532Qdx9JUWKXH2WaInY1vXk1vKlKKBwqgShAOVWbOE27dHqeU4cM bnxMStj+OeuaVDt2uOcv9rq1c1gcxU938Dl3zBkJqqe1tszZSe+65Z39KpkLDTSiGj5xhqLjx9n yrOVSSaXZPN9jhTM= X-Received: by 2002:a37:b546:: with SMTP id e67mr18126692qkf.413.1608570420336; Mon, 21 Dec 2020 09:07:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJymkcd1L59I6axdNey1eL116/CoXEGPpv5EMThXVrnsxqqGp8PX7HGneBGiVtunDeL1BXtZcA== X-Received: by 2002:a37:b546:: with SMTP id e67mr18126669qkf.413.1608570420119; Mon, 21 Dec 2020 09:07:00 -0800 (PST) Received: from [192.168.1.130] (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id x28sm10527357qtv.8.2020.12.21.09.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 09:06:59 -0800 (PST) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Mon, 21 Dec 2020 12:06:58 -0500 (EST) To: "Maciej W. Rozycki" cc: Patrick Palka , Jonathan Wakely , Jonathan Wakely via Libstdc++ , GCC Patches Subject: Re: [PATCH 3/4] libstdc++: Add floating-point std::to_chars implementation In-Reply-To: Message-ID: References: <20200720123123.GA3215@redhat.com> <20200720141330.GB3215@redhat.com> <20201217143248.GA2309743@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.3 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_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2020 17:07:06 -0000 On Sun, 20 Dec 2020, Maciej W. Rozycki wrote: > On Thu, 17 Dec 2020, Patrick Palka via Gcc-patches wrote: > > > > >libstdc++-v3/ChangeLog: > > > > > > > > * config/abi/pre/gnu.ver: Add new exports. > > > > * include/std/charconv (to_chars): Declare the floating-point > > > > overloads for float, double and long double. > > > > * src/c++17/Makefile.am (sources): Add floating_to_chars.cc. > > > > * src/c++17/Makefile.in: Regenerate. > > > > * src/c++17/floating_to_chars.cc: New file. > > > > (to_chars): Define for float, double and long double. > > > > * testsuite/20_util/to_chars/long_double.cc: New test. > > > > > > Sorry it took so long to review, this is OK for trunk. > > > > > > The patch needs some minor changes to rebase it on the current trunk: > > > The linker script has additions since you send this patch, so the > > > context in the patch is wrong and it doesn't apply, and in > > > the first line of context in the patch needs to have 'noexcept' added. > > > That rebase should be easy though. > > > > > > I'll look at adding __float128 support for powerpc64le. > > > > Thanks a lot. I committed the patch series just now, after rebasing > > and retesting on x86_64, aarch64 and ppc64le. > > This breaks with the `vax-netbsdelf' target in GCC compilation: > > .../libstdc++-v3/src/c++17/floating_to_chars.cc:126:38: error: static assertion failed > 126 | static_assert(__DBL_MANT_DIG__ == 53); > | ^ > make[5]: *** [Makefile:577: floating_to_chars.lo] Error 1 > > So what's the fallback/alternative for non-IEEE-754 FP targets? Shouldn't > we call into libc (possibly with a warning attribute) for the formats we > don't have explicit handcoded support for? Sorry about this bootstrap breakage. For now, we should probably just disable the entire file/implementation on such targets until a proper fallback could be implemented. I posted a patch to that effect here https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562379.html which is pending review/approval. Until then, manually stubbing out all of floating_to_chars.cc should probably suffice to restore bootstrap on this target.