public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Patrick Palka <ppalka@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH 4/6] libstdc++: Adjust fast_float's over/underflow behavior for conformnace
Date: Mon, 17 Jan 2022 15:05:51 -0500	[thread overview]
Message-ID: <CAMOnLZYzzUBU61Mr-GnR_6P=vZMmTeb-Frm5J42s--bNcOM-aA@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4=ewbVgjC02nz3xY1Ccn3s1d2=h6pEWE=JrdUYkTKgoxw@mail.gmail.com>

On Mon, Jan 17, 2022 at 5:49 AM Jonathan Wakely <jwakely@redhat.com> wrote:
>
>
>
> 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).

This behavior difference isn't documented AFAICT, so I reported the
issue upstream at https://github.com/fastfloat/fast_float/issues/120


  reply	other threads:[~2022-01-17 20:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 18:06 [PATCH 1/6 v2] libstdc++: Directly implement hexfloat std::from_chars for binary32/64 Patrick Palka
2022-01-16 18:06 ` [PATCH 2/6] libstdc++: Import the fast_float library Patrick Palka
2022-01-17 10:45   ` Jonathan Wakely
2022-01-18  3:10   ` Hans-Peter Nilsson
2022-01-16 18:06 ` [PATCH 3/6] libstdc++: Apply modifications to our local copy of fast_float Patrick Palka
2022-01-17 10:46   ` Jonathan Wakely
2022-01-16 18:06 ` [PATCH 4/6] libstdc++: Adjust fast_float's over/underflow behavior for conformnace Patrick Palka
2022-01-17 10:49   ` Jonathan Wakely
2022-01-17 20:05     ` Patrick Palka [this message]
2022-01-16 18:06 ` [PATCH 5/6] libstdc++: Use fast_float in std::from_chars for binary32/64 Patrick Palka
2022-01-17 10:50   ` Jonathan Wakely
2022-01-16 18:06 ` [PATCH 6/6] libstdc++: Import MSVC floating-point std::from_chars testcases Patrick Palka
2022-01-17 10:54   ` Jonathan Wakely
2022-01-17 20:23     ` Patrick Palka
2022-01-17 10:34 ` [PATCH 1/6 v2] libstdc++: Directly implement hexfloat std::from_chars for binary32/64 Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMOnLZYzzUBU61Mr-GnR_6P=vZMmTeb-Frm5J42s--bNcOM-aA@mail.gmail.com' \
    --to=ppalka@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).