public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7417] libstdc++: Do not assume existence of char8_t codecvt facet
@ 2023-06-06 13:34 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-06-06 13:34 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

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>);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-06 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 13:34 [gcc r13-7417] libstdc++: Do not assume existence of char8_t codecvt facet Jonathan Wakely

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).