]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Adjust fast_float's over/underflow behavior for conformance
authorPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:32:30 +0000 (14:32 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 17 Jan 2022 19:32:30 +0000 (14:32 -0500)
commit40b0d4472a2591cf27f3a81aa3fba57dc4532648
tree3d9005f8d25a592fb09c5f9d597e7879ac532dc7
parentf5c8b82512f9d3eda7e4c71853409d3ac6224777
libstdc++: Adjust fast_float's over/underflow behavior for conformance

This changes fast_float's handling of overflow/underflow to be
consistent with the standard: instead of returning errc{} and setting
value to +-0 or +-infinity, just return errc::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'.
libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES
libstdc++-v3/src/c++17/fast_float/fast_float.h