This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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 26/07/18 16:59 +0100, Jonathan Wakely wrote:
On 26/07/18 11:51 -0400, Marek Polacek wrote:
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?

Doh, yes please do - thanks.

The warning scrolled by too fast for me to see:

/home/jwakely/src/gcc/libstdc++-v3/src/c++98/locale_init.cc:537:36: warning: extra tokens at end of #ifdef directive
#ifdef _GLIBCXX_NUM_UNICODE_FACETS != 0
                                   ^~

The downside of building with -j30 on a big machine.



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