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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Tomasz Kaminski
<tkami...@gcc.gnu.org>:

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

commit r14-11523-gad1b71fc2882c14271ebf2bbaf216cceaa88c76a
Author: Tomasz KamiÅski <tkami...@redhat.com>
Date:   Thu Apr 3 10:23:45 2025 +0200

    libstdc++: Fix handling of field width for wide strings and characters
[PR119593]

    This patch corrects handling of UTF-32LE and UTF32-BE in
    __unicode::__literal_encoding_is_unicode<_CharT>, so they are
    recognized as unicode and functions produces correct result for wchar_t.

    Use `__unicode::__field_width` to compute the estimated witdh
    of the charcter for unicode wide encoding.

            PR libstdc++/119593

    libstdc++-v3/ChangeLog:

            * include/bits/unicode.h
            (__unicode::__literal_encoding_is_unicode<_CharT>):
            Corrected handing for UTF-16 and UTF-32 with "LE" or "BE" suffix.
            * include/std/format (__formatter_str::_S_character_width):
            Define.
            (__formatter_str::_S_character_width): Updated passed char
            length.
            * testsuite/std/format/functions/format.cc: Test for wchar_t.

    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>
    Signed-off-by: Tomasz KamiÅski <tkami...@redhat.com>

Reply via email to