This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/8] Remove char16_t and char32_t dependency on <stdint.h>


On Thu, Jul 26, 2018 at 03:01:51PM +0100, jwakely@redhat.com wrote:
> --- a/libstdc++-v3/src/c++98/locale_init.cc
> +++ b/libstdc++-v3/src/c++98/locale_init.cc
> @@ -201,7 +201,6 @@ namespace
>    fake_messages_w messages_w;
>  #endif
>  
> -#ifdef _GLIBCXX_USE_C99_STDINT_TR1
>    typedef char fake_codecvt_c16[sizeof(codecvt<char16_t, char, mbstate_t>)]
>    __attribute__ ((aligned(__alignof__(codecvt<char16_t, char, mbstate_t>))));
>    fake_codecvt_c16 codecvt_c16;
> @@ -209,7 +208,6 @@ namespace
>    typedef char fake_codecvt_c32[sizeof(codecvt<char32_t, char, mbstate_t>)]
>    __attribute__ ((aligned(__alignof__(codecvt<char32_t, char, mbstate_t>))));
>    fake_codecvt_c32 codecvt_c32;
> -#endif
>  
>    // Storage for "C" locale caches.
>    typedef char fake_num_cache_c[sizeof(std::__numpunct_cache<char>)]
> @@ -329,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      &std::ctype<wchar_t>::id,
>      &codecvt<wchar_t, char, mbstate_t>::id,
>  #endif
> -#ifdef _GLIBCXX_USE_C99_STDINT_TR1
> +#if _GLIBCXX_NUM_UNICODE_FACETS != 0
>      &codecvt<char16_t, char, mbstate_t>::id,
>      &codecvt<char32_t, char, mbstate_t>::id,
>  #endif
> @@ -536,7 +534,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      _M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
>  #endif
>  
> -#ifdef _GLIBCXX_USE_C99_STDINT_TR1
> +#ifdef _GLIBCXX_NUM_UNICODE_FACETS != 0

This seems like a mistake; ok to fix it with the following?

2018-07-26  Marek Polacek  <polacek@redhat.com>

	* src/c++98/locale_init.cc: Fix #ifdef condition.

--- gcc/libstdc++-v3/src/c++98/locale_init.cc
+++ gcc/libstdc++-v3/src/c++98/locale_init.cc
@@ -534,7 +534,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
 #endif
 
-#ifdef _GLIBCXX_NUM_UNICODE_FACETS != 0
+#if _GLIBCXX_NUM_UNICODE_FACETS != 0
     _M_init_facet(new (&codecvt_c16) codecvt<char16_t, char, mbstate_t>(1));
     _M_init_facet(new (&codecvt_c32) codecvt<char32_t, char, mbstate_t>(1));
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]