[Bug libstdc++/105441] [12/13 Regression] The floating point overload of from_chars ignores 'P' for hex format

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 2 11:44:45 GMT 2022


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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:4a6d7da796e456115bbac92e056123f095a3780c

commit r12-8327-g4a6d7da796e456115bbac92e056123f095a3780c
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon May 2 07:00:48 2022 -0400

    libstdc++: case-sensitivity in hexfloat std::from_chars [PR105441]

    The hexfloat parser for binary32/64 added in r12-6645-gcc3bf3404e4b1c
    overlooked that the exponent part can also begin with an uppercase 'P'.

            PR libstdc++/105441

    libstdc++-v3/ChangeLog:

            * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
            Also accept 'P' as the start of the exponent.
            * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.

    (cherry picked from commit 576f975cabb0fd9843de152a2d247d486a967b08)


More information about the Gcc-bugs mailing list