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 7EEC03858006 for ; Mon, 17 Jan 2022 10:49:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EEC03858006 Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-495-ZdATzdvyMBqpDjMrOOxdTQ-1; Mon, 17 Jan 2022 05:49:37 -0500 X-MC-Unique: ZdATzdvyMBqpDjMrOOxdTQ-1 Received: by mail-yb1-f197.google.com with SMTP id y10-20020a2586ca000000b006116aaeeee6so31619956ybm.21 for ; Mon, 17 Jan 2022 02:49:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3jeSBtmDbiODvPSa+70HwIj/a3GQLXPo7DfOUKnoc4o=; b=sNHmwbv3re4cGHWcSzwA3OcPpLwqxHobmFzbrBNdSbM2c6RDtUeXMXSwinFlpxsRoa wgQUef/6sLyQZBp4a31l4bA/npK/juB2bsVbUWFByKIE6wpGr0P98gmdpuRAoJxuHe8t QKtmmDn81yl+fzESLvRfhtzkAcFXZprUmiOMJaVIs7OLPbEqalv24AD+nvtQkzEH39MX +rVw/mtrPSNq0emCzeCSh/0dpW4sNgHm5dZGDc5WktO1x/NVl+g4rG3HrThBPIs1NkC1 diY3p5aoxrHBoR1aOl1sDXepB9QSPvlkND57+NJFvS0KbOjcXoYyGn4hI8zIc+/dlN/5 D6Ww== X-Gm-Message-State: AOAM531CjW2rIORR2+IGYpLP4ALWnDZ2A3WQXt1aLwp330ANA5iPDPnc a6++VGhLGnosAzLCbSQg2pbI8vU5W7YdReYlMnbzpTwGoCuVlSXDgydiP1izkZvrX4lEQtYESNN Zg/ASti3bLpN2i7GWvKX+MUgHHU0YoPogwA== X-Received: by 2002:a25:23cc:: with SMTP id j195mr5802150ybj.13.1642416577030; Mon, 17 Jan 2022 02:49:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPMB8TMd7FwwHC2RcFL7Us1pJ639Tfh7dCSTKAMvWNASYtAOvv8HENgyhyvLTE+a/8DACss+nMKKaLr6ksrRg= X-Received: by 2002:a25:23cc:: with SMTP id j195mr5802136ybj.13.1642416576853; Mon, 17 Jan 2022 02:49:36 -0800 (PST) MIME-Version: 1.0 References: <20220116180652.3694791-1-ppalka@redhat.com> <20220116180652.3694791-4-ppalka@redhat.com> In-Reply-To: <20220116180652.3694791-4-ppalka@redhat.com> From: Jonathan Wakely Date: Mon, 17 Jan 2022 10:49:25 +0000 Message-ID: Subject: Re: [PATCH 4/6] libstdc++: Adjust fast_float's over/underflow behavior for conformnace To: Patrick Palka Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-List-Received-Date: Mon, 17 Jan 2022 10:49:43 -0000 On Sun, 16 Jan 2022 at 18:12, Patrick Palka via Libstdc++ < libstdc++@gcc.gnu.org> wrote: > This makes fast_float handle the situation where std::from_chars is > specified to return result_out_of_range, i.e. when the parsed value > is outside the representable range of the floating-point type. > > This adjusts fast_float's behavior in case of over/underflow: instead of > returning errc{} and setting value to +-0 or +-infinity, return > result_out_of_range and don't modify value, as per [charconv.from.chars]/1. > > libstdc++-v3/ChangeLog: > > * src/c++17/fast_float/LOCAL_PATCHES: Update. > * src/c++17/fast_float/fast_float.h (from_chars_advanced): In > case of over/underflow, return errc::result_out_of_range and don't > modify 'value'. > > Typo in the commit summary line "conformnace". OK for trunk. Please report this as an issue to the upstream project, if you didn't already (and if they haven't documented this as an intentional deviation from the standard).