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

--- Comment #4 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:947a9c801e818f412ad4c669a49297c3512b3a6e

commit r15-781-g947a9c801e818f412ad4c669a49297c3512b3a6e
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Jan 30 14:48:28 2024 +0000

    libstdc++: Fix effects of combining locales [PR108323]

    This fixes a bug in locale::combine where we fail to meet the standard's
    requirement that the result is unnamed. It also implements two library
    issues related to the names of combined locales (2295 and 3676).

    libstdc++-v3/ChangeLog:

            PR libstdc++/108323
            * include/bits/locale_classes.tcc (locale(const locale&, Facet*)):
            Return a copy of the first argument when the facet pointer is
            null, as per LWG 2295.
            (locale::combine): Ensure the result is unnamed.
            * src/c++11/localename.cc (_M_replace_categories): Ignore
            whether the second locale has a name when cat == none, as per
            LWG 3676.
            * src/c++98/locale.cc (_M_install_facet): Use __builtin_expect
            to predict that the facet pointer is non-null.
            * testsuite/22_locale/locale/cons/names.cc: New test.

Reply via email to