public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-7417] libstdc++: Do not assume existence of char8_t codecvt facet Date: Tue, 6 Jun 2023 13:34:10 +0000 (GMT) [thread overview] Message-ID: <20230606133410.692353858D33@sourceware.org> (raw) https://gcc.gnu.org/g:ad12d81e5922d0c3087f1f2569618c31e8db208c commit r13-7417-gad12d81e5922d0c3087f1f2569618c31e8db208c Author: Joseph Faulls <Joseph.Faulls@imgtec.com> Date: Fri Jun 2 15:44:48 2023 +0000 libstdc++: Do not assume existence of char8_t codecvt facet It is not required that codecvt<char8_t, char, mbstate_t> facet be supported by the locale, nor is it added as part of the default locale. This can lead to dangerous behaviour when static_cast. libstdc++-v3/ChangeLog: * include/bits/locale_classes.tcc: Remove check for codecvt<char8_t, char, mbstate_t> facet. (cherry picked from commit 3d9b3ddb5fc9087c17645d53e6bcb1881e1955a4) Diff: --- libstdc++-v3/include/bits/locale_classes.tcc | 3 --- 1 file changed, 3 deletions(-) diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 94838cd7796..2351dd5bcfb 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -129,9 +129,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_STD_FACET(time_put<wchar_t>); _GLIBCXX_STD_FACET(messages<wchar_t>); #endif -#ifdef _GLIBCXX_USE_CHAR8_T - _GLIBCXX_STD_FACET(codecvt<char8_t, char, mbstate_t>); -#endif #if __cplusplus >= 201103L _GLIBCXX_STD_FACET(codecvt<char16_t, char, mbstate_t>); _GLIBCXX_STD_FACET(codecvt<char32_t, char, mbstate_t>);
reply other threads:[~2023-06-06 13:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230606133410.692353858D33@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).