Re: [PATCH] libstdc++: Fix ERANGE behavior for fallback FP std::from_chars

2022-11-02 Thread Jonathan Wakely via Gcc-patches
On Tue, 1 Nov 2022 at 21:30, Patrick Palka via Libstdc++ wrote: > > The fallback implementation of floating-point std::from_chars for e.g. > float80 just calls the C library's strtod family of functions. In case > of overflow of the parsed result, the behavior of these functions is > rigidly spec

[PATCH] libstdc++: Fix ERANGE behavior for fallback FP std::from_chars

2022-11-01 Thread Patrick Palka via Gcc-patches
The fallback implementation of floating-point std::from_chars for e.g. float80 just calls the C library's strtod family of functions. In case of overflow of the parsed result, the behavior of these functions is rigidly specified: If the correct value overflows and default rounding is in effect,