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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:a57439d61937925cec48df6166b2a805ae7054d5

commit r14-8315-ga57439d61937925cec48df6166b2a805ae7054d5
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Sat Jan 20 00:44:12 2024 +0000

    libstdc++: Fix std::format floating-point alternate forms [PR113512]

    The logic for handling '#' forms was ... not good. The count of
    significant figures just counted digits, instead of ignoring leading
    zeros. And when moving the result from the stack buffer to a dynamic
    string the exponent could get lost in some cases.

    libstdc++-v3/ChangeLog:

            PR libstdc++/113512
            * include/std/format (__formatter_fp::format): Fix logic for
            alternate forms.
            * testsuite/std/format/functions/format.cc: Check buggy cases of
            alternate forms with g presentation type.

Reply via email to