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 BEF6F3858D3C for ; Mon, 17 Jan 2022 20:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BEF6F3858D3C Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-371-8mNiUCinPaq5KxwSa_cfHg-1; Mon, 17 Jan 2022 15:06:04 -0500 X-MC-Unique: 8mNiUCinPaq5KxwSa_cfHg-1 Received: by mail-ed1-f71.google.com with SMTP id ee53-20020a056402293500b004022f34edcbso4320411edb.11 for ; Mon, 17 Jan 2022 12:06:04 -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=5CSZzX1wksyo3fdhXX9IEd+Z8SUmvmlF3p3gLaVuf+I=; b=YOyxrJ6ipPkZv1LqJLdf4nK09ALZfpWN+Ypkl14JiuT38ppaH+XCJ/KcJbAEawgMbP PLYQLHqFZviJr4dphu4cMs5rIhTLcgEPinsBaaysBplAMQxMqE1i/TjGm5P90Lxc91Zw nwum3b5Ht1sDAeAnkO5ElkyZS1L8fVEuwfn4snALaVwLkmDoharjNuOcWJLYna3N3MIR FZvBMvucpxEhE2Yfq8FZ4w4Ul8y7P/fFZUniAKScM65+zvf+QnMiwcp+nHdQ1vkh/GAN tFVI03cXpBF5umqMxQRQJ/X7WvEnBYIGYldLs1AlxbGfKWK2hcBx9lZXJy5jCOJDuyvE Ah2g== X-Gm-Message-State: AOAM532JziVkvQYsRijcJjVg6GG4fZeqY2Dymq66NmMS2iBchURPwK0A drNrfRq30BDPgvhge+0XN8DGBwUACSjpFrnfl3S8LYIYDQy7Tu9Zv12sEgA35jYPBjbR692NaKl uczLvm45v9WJGPTxX/MOrMkNiLmORnpFNOQ== X-Received: by 2002:a17:907:6da0:: with SMTP id sb32mr18804206ejc.455.1642449963615; Mon, 17 Jan 2022 12:06:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMcZgBFa/m1c1rNPq1BP49zK0WkHjDE6qYREZG51XomSbz1rthDdGRZ7o2l0fvwOwu/SBnYhMW5z8H/TdREFI= X-Received: by 2002:a17:907:6da0:: with SMTP id sb32mr18804188ejc.455.1642449963257; Mon, 17 Jan 2022 12:06:03 -0800 (PST) MIME-Version: 1.0 References: <20220116180652.3694791-1-ppalka@redhat.com> <20220116180652.3694791-4-ppalka@redhat.com> In-Reply-To: From: Patrick Palka Date: Mon, 17 Jan 2022 15:05:51 -0500 Message-ID: Subject: Re: [PATCH 4/6] libstdc++: Adjust fast_float's over/underflow behavior for conformnace To: Jonathan Wakely Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 17 Jan 2022 20:06:09 -0000 On Mon, Jan 17, 2022 at 5:49 AM Jonathan Wakely wrote: > > > > On Sun, 16 Jan 2022 at 18:12, Patrick Palka via Libstdc++ 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). This behavior difference isn't documented AFAICT, so I reported the issue upstream at https://github.com/fastfloat/fast_float/issues/120