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 9236E3858410 for ; Tue, 1 Nov 2022 12:18:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9236E3858410 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=1667305111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GaubaEhkWuIDqhA9n6zIX9nql39AMACa2aCICIUlR7w=; b=RWrzsjwzbDeEZdBvEtD1R1rz2Dy1ifvpyrbSlzxOH1JHiGyC/kk8BLwNQ2PaQw8WiFVflf K3XwWSshpoGO7gPHekb01Gz1WMY7v+vzJvsLPlIC9aguUuI1YTwzcoE1tPB6iNLIqjei28 /N1ApJF/ygZLwqOZjqZSPdOfZrgi8m0= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-6-sGuq0V2MOOKycm4rhk4RKA-1; Tue, 01 Nov 2022 08:18:30 -0400 X-MC-Unique: sGuq0V2MOOKycm4rhk4RKA-1 Received: by mail-ed1-f72.google.com with SMTP id y14-20020a056402440e00b0044301c7ccd9so9768218eda.19 for ; Tue, 01 Nov 2022 05:18:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GaubaEhkWuIDqhA9n6zIX9nql39AMACa2aCICIUlR7w=; b=5Oyh6Kx0vf0uaV3Tz3e4baIZBiS3nIp4LFQrUXmr2eXM+icFV7VQKo+9safYWtgp+P GVJnx1RyA+JBgB4e7UcHEwaA5nnRIz3EB5xnE9AxW+coIwzc8ZEa9Qcdc8hMYQmFAjR+ NH9tb80PSuwbKi4IZDNC2mzILxf91xI/cgJ4dyIRWRcbar0PriluG2TJLJbT4kPoo3hA HVYuzxHPMbhE6I3j4NIHRjjAcWZtEwA+dqiUjBNasWf6Xk+avMdCkhPwNeMsCyDLdZLB ltTMgQP+xZrRYt2/BSPylDgwwWr8RMoEd35tsOhGCwLMmgp7484axQcz6Dqe9/kfjprb fKTA== X-Gm-Message-State: ACrzQf0qhisKWJWjzPqlhF06CKLIi4YvPx1WBZ1SaslHDTnyjqE/tEli eo5IXK6iq6LVzY3h2cyA7VtNRQ/Y1UufHPFC14G+gI6n6xjVBjsHU9Jw2mVg+6ln0x5A6udkMqW y8fDNVEG35UIYCMQmH54FZSduItqrWIuoAg== X-Received: by 2002:a17:906:49d2:b0:7a8:5284:addd with SMTP id w18-20020a17090649d200b007a85284adddmr109652ejv.169.1667305109218; Tue, 01 Nov 2022 05:18:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4GsRfNE/UfxZuJhh4EDi2SJ0RGl/pblKRqyT7+j6MN60oviUoOTwvBYKOdRh/OOmYkFHu3EKEJqVLadoaphic= X-Received: by 2002:a17:906:49d2:b0:7a8:5284:addd with SMTP id w18-20020a17090649d200b007a85284adddmr109647ejv.169.1667305108979; Tue, 01 Nov 2022 05:18:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 1 Nov 2022 12:18:18 +0000 Message-ID: Subject: Re: [PATCH] libstdc++-v3: Some std::*float*_t charconv and i/ostream overloads To: Jakub Jelinek Cc: Patrick Palka , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.8 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: On Wed, 19 Oct 2022 at 13:59, Jakub Jelinek wrote: > > Hi! > > The following patch adds the easy part of , and > changes for extended floats. > In particular, for the first one only overloads where the _Float* has > the same format as float/double/long double and for the latter two > everything but the _GLIBCXX_HAVE_FLOAT128_MATH case. > For charconv, I'm not really familiar with it, I'm pretty sure > we need new libstdc++.so.6 side implementation of from_chars for > {,b}float16_t and for to_chars not really sure but for unspecified precision > if it should emit minimum characters that to_chars then can unambiguously > parse, I think it is less than in the float case. For float128_t > {to,from}_chars I think we even have it on the library side already, just > ifdefed for powerpc64le only. > For i/o stream operator<>, not sure what is better, if not providing > anything at all, or doing what we in the end do if user doesn't override > the virtual functions, or use {to,from}_chars under the hood, something > else? > Besides this, the patch adds some further missed > // { dg-options "-std=gnu++2b" } > spots, I've also noticed I got the formatting wrong in some testcases > by not using spaces around VERIFY conditions and elsewhere by having > space before ( for calls. > The testsuite coverage is limited, I've added test for from_chars because > it was easy to port, but not really sure what to do about to_chars, it has > for float/double huge testcases which would be excessive to repeat. > And for i/ostream not really sure what exactly is worth testing. > > Tested on x86_64-linux with --target_board=unix/-std=gnu++23, ok for trunk? > OK, thanks!