[Bug libstdc++/123078] [LWG 3081] std::from_chars handles signedness of zero in underflow inconsistently with floating-point literals

janschultke at googlemail dot com gcc-bugzilla@gcc.gnu.org
Wed Dec 10 13:38:17 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123078

--- Comment #12 from Jan Schultke <janschultke at googlemail dot com> ---
Also note the original design discussion on std::from_chars in P0067R5:

> There are two failure modes:
> no characters match, or
> the pattern translates to a value that is not in the range representable by T.

There is nothing in design discussion or the wording that suggests that
underflow or lack of precision would result in a "failure mode". Rejecting an
input for being too close to zero (like libstdc++, unlike other
implementations) is arbitrary and incorrect.


More information about the Gcc-bugs mailing list