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.129.124]) by sourceware.org (Postfix) with ESMTPS id 1E29E385829C for ; Tue, 1 Nov 2022 12:18:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1E29E385829C 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-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-449-QoyYul7yPg6nQeWsYCiYmw-1; Tue, 01 Nov 2022 08:18:30 -0400 X-MC-Unique: QoyYul7yPg6nQeWsYCiYmw-1 Received: by mail-ej1-f72.google.com with SMTP id he6-20020a1709073d8600b0078e20190301so7839853ejc.22 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=juvfuzMTU3byaj1iuqPRiOeGEvq+UDXHLQDAO2Q0Bk44uHxagL/i4HDjqmuEKABTsI 5+z3E+IQDgZuiNMHwGB9vYVOw6fGLKYSR7KFqoRiOEp79GM6LOPbNba1ZD0v0Di9lFTA 5DwYUkZ7CuJjjVdfulrigaMghkZ2c0n8ZjPIaQsxNj/5w4mTt2vJZtKhnwm9e4IgKIiG shZxd4CPEi7coIo0/UMwqXgcHwIExk7/JL+nJQM+CE7Z2kB9Mk5IL3KQO0CHGgF1fPuF 1w7uoggHR2wroW4CdjLZVpjbtcEvvWKQ2Zdl2AnxmEsmPMbmhJaTp135Cxlm3j3EdCm0 /WkQ== X-Gm-Message-State: ACrzQf0eBjFk1Z+nVqojJrJyHdkhXAvCBRZzASeynWnGNQrk9P2EMogd 0JRrdNDNW8cfUzdTXY29bIQOh/WnojizbnAmetMpL1Lyh7CT+WBxUk/5RaaSRB8VNu38e6XOweN f4/C8QS8xDBV9/k2DEBAuQYODUjLxKd0= X-Received: by 2002:a17:906:49d2:b0:7a8:5284:addd with SMTP id w18-20020a17090649d200b007a85284adddmr109651ejv.169.1667305109208; 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.9 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 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!