summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/c++11
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src/c++11')
-rw-r--r--libstdc++-v3/src/c++11/Makefile.in6
-rw-r--r--libstdc++-v3/src/c++11/compatibility-ldbl-alt128-cxx11.cc102
-rw-r--r--libstdc++-v3/src/c++11/compatibility-ldbl-alt128.cc244
-rw-r--r--libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h128
-rw-r--r--libstdc++-v3/src/c++11/cow-locale_init.cc1
-rw-r--r--libstdc++-v3/src/c++11/cxx11-locale-inst.cc6
-rw-r--r--libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc8
-rw-r--r--libstdc++-v3/src/c++11/locale-inst-monetary.h69
-rw-r--r--libstdc++-v3/src/c++11/locale-inst-numeric.h133
-rw-r--r--libstdc++-v3/src/c++11/locale-inst.cc200
-rw-r--r--libstdc++-v3/src/c++11/wlocale-inst.cc45
11 files changed, 697 insertions, 245 deletions
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index dbef02597ac..ae3a2fd5b4e 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -282,6 +282,8 @@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
+LONG_DOUBLE_128_FLAGS = @LONG_DOUBLE_128_FLAGS@
+LONG_DOUBLE_ALT128_COMPAT_FLAGS = @LONG_DOUBLE_ALT128_COMPAT_FLAGS@
LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@
LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@
@@ -421,11 +423,13 @@ toolexeclibdir = $(glibcxx_toolexeclibdir)
@ENABLE_WERROR_TRUE@WERROR_FLAG = -Werror
@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS =
@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates
+@GLIBCXX_LDBL_ALT128_COMPAT_FALSE@LDBL_128_FLAGS =
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@LDBL_128_FLAGS = $(LONG_DOUBLE_128_FLAGS)
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
CONFIG_CXXFLAGS = \
- $(SECTION_FLAGS) $(HWCAP_CFLAGS) -frandom-seed=$@
+ $(SECTION_FLAGS) $(HWCAP_CFLAGS) -frandom-seed=$@ $(LDBL_128_FLAGS)
WARN_CXXFLAGS = \
$(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once
diff --git a/libstdc++-v3/src/c++11/compatibility-ldbl-alt128-cxx11.cc b/libstdc++-v3/src/c++11/compatibility-ldbl-alt128-cxx11.cc
new file mode 100644
index 00000000000..7c03606bce4
--- /dev/null
+++ b/libstdc++-v3/src/c++11/compatibility-ldbl-alt128-cxx11.cc
@@ -0,0 +1,102 @@
+// Compatibility symbols for alternate 128-bit long-double format -*- C++ -*-
+
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#define _GLIBCXX_USE_CXX11_ABI 1
+#include <locale>
+
+#ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+
+#if !defined(_GLIBCXX_USE_DUAL_ABI)
+#error "compatibility-ldbl-alt128-cxx11.cc must only be compiled when dual ABI is enabled"
+#endif
+
+#if ! defined __LONG_DOUBLE_IBM128__ && ! defined __LONG_DOUBLE_IEEE128__
+#error "compatibility-ldbl-alt128.cc must only be compiled for 128-bit long double"
+#endif
+
+#define C char
+#define C_is_char
+#include "locale-inst-monetary.h"
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+# undef C
+# undef C_is_char
+# define C wchar_t
+# include "locale-inst-monetary.h"
+#endif
+
+#include <functional>
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ namespace
+ {
+ alignas(money_get<char>) char money_get_c[sizeof(money_get<char>)];
+ alignas(money_put<char>) char money_put_c[sizeof(money_put<char>)];
+#ifdef _GLIBCXX_USE_WCHAR_T
+ alignas(money_get<wchar_t>) char money_get_w[sizeof(money_get<wchar_t>)];
+ alignas(money_put<wchar_t>) char money_put_w[sizeof(money_put<wchar_t>)];
+#endif
+
+ template<typename Facet>
+ void
+ init_facet(function<void(const locale::id*, const locale::facet*)>& func,
+ Facet* facet)
+ {
+ func(&Facet::id, facet);
+ }
+
+ } // namespace
+
+ template class function<void(const locale::id*, const locale::facet*)>;
+
+ void
+ __locale_Impl_init_extra_ldbl128(
+ function<void(const locale::id*, const locale::facet*)> f,
+ bool classic)
+ {
+ if (classic)
+ {
+ init_facet(f, new (&money_get_c) money_get<char>(1));
+ init_facet(f, new (&money_put_c) money_put<char>(1));
+#ifdef _GLIBCXX_USE_WCHAR_T
+ init_facet(f, new (&money_get_w) money_get<wchar_t>(1));
+ init_facet(f, new (&money_put_w) money_put<wchar_t>(1));
+#endif
+ }
+ else
+ {
+ init_facet(f, new money_get<char>);
+ init_facet(f, new money_put<char>);
+#ifdef _GLIBCXX_USE_WCHAR_T
+ init_facet(f, new money_get<wchar_t>);
+ init_facet(f, new money_put<wchar_t>);
+#endif
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+#endif
diff --git a/libstdc++-v3/src/c++11/compatibility-ldbl-alt128.cc b/libstdc++-v3/src/c++11/compatibility-ldbl-alt128.cc
new file mode 100644
index 00000000000..7fb66917db1
--- /dev/null
+++ b/libstdc++-v3/src/c++11/compatibility-ldbl-alt128.cc
@@ -0,0 +1,244 @@
+// Compatibility symbols for alternate 128-bit long-double format -*- C++ -*-
+
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#define _GLIBCXX_USE_CXX11_ABI 0
+#include <locale>
+
+#ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+
+#if ! defined __LONG_DOUBLE_IBM128__ && ! defined __LONG_DOUBLE_IEEE128__
+#error "compatibility-ldbl-alt128.cc must only be compiled for 128-bit long double"
+#endif
+
+#define C char
+#define C_is_char
+#include "locale-inst-numeric.h"
+#include "locale-inst-monetary.h"
+#include "compatibility-ldbl-facets-aliases.h"
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+# undef C
+# undef C_is_char
+# define C wchar_t
+# include "locale-inst-numeric.h"
+# include "locale-inst-monetary.h"
+# include "compatibility-ldbl-facets-aliases.h"
+# undef C
+#endif
+
+#include <limits>
+#include <functional>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // long double
+ const bool numeric_limits<long double>::is_specialized;
+ const int numeric_limits<long double>::digits;
+ const int numeric_limits<long double>::digits10;
+ const int numeric_limits<long double>::max_digits10;
+ const bool numeric_limits<long double>::is_signed;
+ const bool numeric_limits<long double>::is_integer;
+ const bool numeric_limits<long double>::is_exact;
+ const int numeric_limits<long double>::radix;
+ const int numeric_limits<long double>::min_exponent;
+ const int numeric_limits<long double>::min_exponent10;
+ const int numeric_limits<long double>::max_exponent;
+ const int numeric_limits<long double>::max_exponent10;
+ const bool numeric_limits<long double>::has_infinity;
+ const bool numeric_limits<long double>::has_quiet_NaN;
+ const bool numeric_limits<long double>::has_signaling_NaN;
+ const float_denorm_style numeric_limits<long double>::has_denorm;
+ const bool numeric_limits<long double>::has_denorm_loss;
+ const bool numeric_limits<long double>::is_iec559;
+ const bool numeric_limits<long double>::is_bounded;
+ const bool numeric_limits<long double>::is_modulo;
+ const bool numeric_limits<long double>::traps;
+ const bool numeric_limits<long double>::tinyness_before;
+ const float_round_style numeric_limits<long double>::round_style;
+
+ template<>
+ void
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc) throw()
+ {
+ char* __sanity;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ // Prefer strtold_l, as __strtold_l isn't prototyped in more recent
+ // glibc versions.
+ __v = strtold_l(__s, &__sanity, __cloc);
+#else
+ __v = __strtold_l(__s, &__sanity, __cloc);
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 23. Num_get overflow result.
+ if (__sanity == __s || *__sanity != '\0')
+ {
+ __v = 0.0l;
+ __err = ios_base::failbit;
+ }
+ else if (__v == numeric_limits<long double>::infinity())
+ {
+ __v = numeric_limits<long double>::max();
+ __err = ios_base::failbit;
+ }
+ else if (__v == -numeric_limits<long double>::infinity())
+ {
+ __v = -numeric_limits<long double>::max();
+ __err = ios_base::failbit;
+ }
+ }
+
+ namespace
+ {
+ alignas(money_get<char>) char money_get_c[sizeof(money_get<char>)];
+ alignas(money_put<char>) char money_put_c[sizeof(money_put<char>)];
+ alignas(num_get<char>) char num_get_c[sizeof(num_get<char>)];
+ alignas(num_put<char>) char num_put_c[sizeof(num_put<char>)];
+#ifdef _GLIBCXX_USE_WCHAR_T
+ alignas(money_get<wchar_t>) char money_get_w[sizeof(money_get<wchar_t>)];
+ alignas(money_put<wchar_t>) char money_put_w[sizeof(money_put<wchar_t>)];
+ alignas(num_get<wchar_t>) char num_get_w[sizeof(num_get<wchar_t>)];
+ alignas(num_put<wchar_t>) char num_put_w[sizeof(num_put<wchar_t>)];
+#endif
+ }
+
+ extern void
+ __locale_Impl_init_extra_ldbl128(
+ function<void(const locale::id*, const locale::facet*)>,
+ bool);
+
+ void
+ locale::_Impl::_M_init_extra_ldbl128(bool classic)
+ {
+ if (classic)
+ {
+ _M_init_facet(new (&money_get_c) money_get<char>(1));
+ _M_init_facet(new (&money_put_c) money_put<char>(1));
+ _M_init_facet(new (&num_get_c) num_get<char>(1));
+ _M_init_facet(new (&num_put_c) num_put<char>(1));
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _M_init_facet(new (&money_get_w) money_get<wchar_t>(1));
+ _M_init_facet(new (&money_put_w) money_put<wchar_t>(1));
+ _M_init_facet(new (&num_get_w) num_get<wchar_t>(1));
+ _M_init_facet(new (&num_put_w) num_put<wchar_t>(1));
+#endif
+ }
+ else
+ {
+ _M_init_facet(new money_get<char>);
+ _M_init_facet(new money_put<char>);
+ _M_init_facet(new num_get<char>);
+ _M_init_facet(new num_put<char>);
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _M_init_facet(new money_get<wchar_t>);
+ _M_init_facet(new money_put<wchar_t>);
+ _M_init_facet(new num_get<wchar_t>);
+ _M_init_facet(new num_put<wchar_t>);
+#endif
+ }
+
+#if _GLIBCXX_USE_DUAL_ABI
+ __locale_Impl_init_extra_ldbl128(
+ [this](const locale::id* i, const facet* f) {
+ _M_install_facet(i, f);
+ },
+ classic);
+#endif
+ }
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#include <istream>
+#include <ostream>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ template istream& istream::operator>>(long double&);
+ template istream& istream::_M_extract(long double&);
+ template ostream& ostream::operator<<(long double);
+ template ostream& ostream::_M_insert(long double);
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template wistream& wistream::operator>>(long double&);
+ template wistream& wistream::_M_extract(long double&);
+ template wostream& wostream::operator<<(long double);
+ template wostream& wostream::_M_insert(long double);
+#endif
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#include <complex>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ template
+ basic_istream<char, char_traits<char> >&
+ operator>>(basic_istream<char, char_traits<char> >&,
+ complex<long double>&);
+ template
+ basic_ostream<char, char_traits<char> >&
+ operator<<(basic_ostream<char, char_traits<char> >&,
+ const complex<long double>&);
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template
+ basic_istream<wchar_t, char_traits<wchar_t> >&
+ operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&,
+ complex<long double>&);
+ template
+ basic_ostream<wchar_t, char_traits<wchar_t> >&
+ operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
+ const complex<long double>&);
+#endif
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
+
+#include <cmath>
+#include <tr1/functional>
+
+// For std::tr1::hash<long double>::operator()
+#include "../c++98/hash-long-double-tr1-aux.cc"
+
+// std::tr1::hash<long double>::operator()
+// and std::hash<long double>::operator()
+// are the same, no need to duplicate them.
+#ifdef __LONG_DOUBLE_IBM128__
+extern "C" size_t
+_ZNKSt4hashIgEclEg (void)
+ __attribute__((pure))
+ __attribute__((alias ("_ZNKSt3tr14hashIgEclEg")));
+#elif __LONG_DOUBLE_IEEE128__
+extern "C" size_t
+_ZNKSt4hashIu9__ieee128EclEu9__ieee128 (void)
+ __attribute__((pure))
+ __attribute__((alias ("_ZNKSt3tr14hashIu9__ieee128EclEu9__ieee128")));
+#else
+# error "Configuration error"
+#endif
+
+#endif
diff --git a/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h b/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
new file mode 100644
index 00000000000..7bdf9810d0e
--- /dev/null
+++ b/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
@@ -0,0 +1,128 @@
+// Compatibility aliases for long double support in locales -*- C++ -*-
+
+// Copyright (C) 1999-2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef C
+#define "This file should not be compiled directly, only included"
+#endif
+
+#ifndef _GLIBCXX_LONG_DOUBLE_COMPAT
+#define "This file should only be used for _GLIBCXX_LONG_DOUBLE_COMPAT builds"
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+#if defined __LONG_DOUBLE_128__ && ! defined __LONG_DOUBLE_IEEE128__
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+
+// Define members of std::num_get and std::num_put as aliases for
+// members of __gnu_cxx_ldbl128::num_get and __gnu_cxx_ldbl128::num_put
+#ifdef C_is_char
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_,
+ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+ _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+ _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs,
+ _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs,
+ _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs);
+#else // ! C_is_char
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES4_S4_RSt8ios_basewT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES4_S4_RSt8ios_basewT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES4_S4_RSt8ios_basewT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES4_S4_RSt8ios_basewT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES4_S4_RSt8ios_basewcT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_,
+ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIeEES3_S3_RSt8ios_basewcT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+ _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+ _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
+ _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
+ _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
+#endif // C_is_char
+
+
+#if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+// Define __gnu_cxx_ieee128::num_put<>::_M_insert_float(..., __ibm128) as
+// alias of __gnu_cxx_ldbl128::num_put<>::_M_insert_float(..., __ibm128)
+# ifdef C_is_char
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIgEES4_S4_RSt8ios_baseccT_,
+ _ZNKSt17__gnu_cxx_ieee1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIgEES4_S4_RSt8ios_baseccT_);
+# else
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIgEES4_S4_RSt8ios_basewcT_,
+ _ZNKSt17__gnu_cxx_ieee1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIgEES4_S4_RSt8ios_basewcT_);
+# endif
+#endif // _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+
+#undef _GLIBCXX_LDBL_COMPAT
+#pragma GCC diagnostic pop
+
+#endif // __LONG_DOUBLE_128__ && ! __LONG_DOUBLE_IEEE128__
diff --git a/libstdc++-v3/src/c++11/cow-locale_init.cc b/libstdc++-v3/src/c++11/cow-locale_init.cc
index 98a2ef41f56..bf270712e47 100644
--- a/libstdc++-v3/src/c++11/cow-locale_init.cc
+++ b/libstdc++-v3/src/c++11/cow-locale_init.cc
@@ -125,6 +125,7 @@ namespace
_M_init_facet_unchecked(new (&messages_w) std::messages<wchar_t>(1));
#endif
+ // The caches must be populated last, after creating all facets.
_M_caches[numpunct<char>::id._M_id()] = __npc;
_M_caches[moneypunct<char, false>::id._M_id()] = __mpcf;
_M_caches[moneypunct<char, true>::id._M_id()] = __mpct;
diff --git a/libstdc++-v3/src/c++11/cxx11-locale-inst.cc b/libstdc++-v3/src/c++11/cxx11-locale-inst.cc
index 7b132a748bf..9378550124f 100644
--- a/libstdc++-v3/src/c++11/cxx11-locale-inst.cc
+++ b/libstdc++-v3/src/c++11/cxx11-locale-inst.cc
@@ -32,8 +32,6 @@
# error This file should not be compiled for this configuration.
#endif
-#ifndef C
-# define C char
-# define C_is_char
-#endif
+#define C char
+#define C_is_char
# include "locale-inst.cc"
diff --git a/libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc b/libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc
index cf3d6dc7e34..07eb6008361 100644
--- a/libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc
+++ b/libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc
@@ -24,9 +24,15 @@
// ISO C++ 14882: 22.1 Locales
//
+// Facet wchar_t instantiations using new ABI strings.
+
#define _GLIBCXX_USE_CXX11_ABI 1
#include <bits/c++config.h>
+#if ! _GLIBCXX_USE_DUAL_ABI
+# error This file should not be compiled for this configuration.
+#endif
+
#ifdef _GLIBCXX_USE_WCHAR_T
#define C wchar_t
-#include "cxx11-locale-inst.cc"
+#include "locale-inst.cc"
#endif
diff --git a/libstdc++-v3/src/c++11/locale-inst-monetary.h b/libstdc++-v3/src/c++11/locale-inst-monetary.h
new file mode 100644
index 00000000000..e9b3e7c4e0c
--- /dev/null
+++ b/libstdc++-v3/src/c++11/locale-inst-monetary.h
@@ -0,0 +1,69 @@
+// Explicit instantantiations for monetary facets -*- C++ -*-
+
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef C
+#define "This file should not be compiled directly, only included"
+#endif
+
+// This header is included multiple times, to instantiate these symbols
+// for char/wchar_t and for both std::string ABIs,
+// and (depending on the target) for two long double formats.
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+ template const money_put<C>& use_facet<money_put<C> >(const locale&);
+ template const money_get<C>& use_facet<money_get<C> >(const locale&);
+
+ template bool has_facet<money_put<C> >(const locale&);
+ template bool has_facet<money_get<C> >(const locale&);
+
+_GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
+ template class money_get<C, istreambuf_iterator<C> >;
+ template class money_put<C, ostreambuf_iterator<C> >;
+
+ template
+ istreambuf_iterator<C>
+ money_get<C, istreambuf_iterator<C> >::
+ _M_extract<true>(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&, string&) const;
+
+ template
+ istreambuf_iterator<C>
+ money_get<C, istreambuf_iterator<C> >::
+ _M_extract<false>(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&, string&) const;
+
+ template
+ ostreambuf_iterator<C>
+ money_put<C, ostreambuf_iterator<C> >::
+ _M_insert<true>(ostreambuf_iterator<C>, ios_base&, C,
+ const string_type&) const;
+
+ template
+ ostreambuf_iterator<C>
+ money_put<C, ostreambuf_iterator<C> >::
+ _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
+ const string_type&) const;
+_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
+} // namespace std
diff --git a/libstdc++-v3/src/c++11/locale-inst-numeric.h b/libstdc++-v3/src/c++11/locale-inst-numeric.h
new file mode 100644
index 00000000000..0ec93e27937
--- /dev/null
+++ b/libstdc++-v3/src/c++11/locale-inst-numeric.h
@@ -0,0 +1,133 @@
+// Explicit instantantiations for numeric facets -*- C++ -*-
+
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef C
+#define "This file should not be compiled directly, only included"
+#endif
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+#if ! _GLIBCXX_USE_CXX11_ABI
+ template const num_get<C>& use_facet<num_get<C> >(const locale&);
+ template const num_put<C>& use_facet<num_put<C> >(const locale&);
+
+ template bool has_facet<num_get<C> >(const locale&);
+ template bool has_facet<num_put<C> >(const locale&);
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE_LDBL
+
+#if ! _GLIBCXX_USE_CXX11_ABI
+ template class num_get<C, istreambuf_iterator<C> >;
+ template class num_put<C, ostreambuf_iterator<C> >;
+#endif
+
+ // num_get member function templates
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ long&) const;
+
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned short&) const;
+
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned int&) const;
+
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned long&) const;
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ long long&) const;
+
+ template
+ istreambuf_iterator<C>
+ num_get<C, istreambuf_iterator<C> >::
+ _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
+ ios_base&, ios_base::iostate&,
+ unsigned long long&) const;
+#endif
+
+#if ! _GLIBCXX_USE_CXX11_ABI
+ // num_put member function templates
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ long) const;
+
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ unsigned long) const;
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ long long) const;
+
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
+ unsigned long long) const;
+#endif
+
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
+ double) const;
+
+ template
+ ostreambuf_iterator<C>
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
+ long double) const;
+#endif
+
+_GLIBCXX_END_NAMESPACE_LDBL
+} // namespace std
diff --git a/libstdc++-v3/src/c++11/locale-inst.cc b/libstdc++-v3/src/c++11/locale-inst.cc
index 4dc7f5c0780..cd99648e8f6 100644
--- a/libstdc++-v3/src/c++11/locale-inst.cc
+++ b/libstdc++-v3/src/c++11/locale-inst.cc
@@ -43,6 +43,9 @@
# define C_is_char
#endif
+#include "locale-inst-numeric.h"
+#include "locale-inst-monetary.h"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -58,33 +61,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
template class moneypunct_byname<C, false>;
template class moneypunct_byname<C, true>;
_GLIBCXX_END_NAMESPACE_CXX11
-_GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
- template class money_get<C, istreambuf_iterator<C> >;
- template class money_put<C, ostreambuf_iterator<C> >;
- template
- istreambuf_iterator<C>
- money_get<C, istreambuf_iterator<C> >::
- _M_extract<true>(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&, string&) const;
-
- template
- istreambuf_iterator<C>
- money_get<C, istreambuf_iterator<C> >::
- _M_extract<false>(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&, string&) const;
-
- template
- ostreambuf_iterator<C>
- money_put<C, ostreambuf_iterator<C> >::
- _M_insert<true>(ostreambuf_iterator<C>, ios_base&, C,
- const string_type&) const;
-
- template
- ostreambuf_iterator<C>
- money_put<C, ostreambuf_iterator<C> >::
- _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
- const string_type&) const;
-_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
// numpunct, numpunct_byname, num_get, and num_put
#if ! _GLIBCXX_USE_CXX11_ABI
@@ -94,97 +70,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
template class numpunct<C>;
template class numpunct_byname<C>;
_GLIBCXX_END_NAMESPACE_CXX11
-_GLIBCXX_BEGIN_NAMESPACE_LDBL
-#if ! _GLIBCXX_USE_CXX11_ABI
- template class num_get<C, istreambuf_iterator<C> >;
-#endif
-
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- long&) const;
-
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- unsigned short&) const;
-
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- unsigned int&) const;
-
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- unsigned long&) const;
-
-#ifdef _GLIBCXX_USE_LONG_LONG
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- long long&) const;
-
- template
- istreambuf_iterator<C>
- num_get<C, istreambuf_iterator<C> >::
- _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
- ios_base&, ios_base::iostate&,
- unsigned long long&) const;
-#endif
-
-#if ! _GLIBCXX_USE_CXX11_ABI
- template class num_put<C, ostreambuf_iterator<C> >;
-
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
- long) const;
-
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
- unsigned long) const;
-
-#ifdef _GLIBCXX_USE_LONG_LONG
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
- long long) const;
-
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
- unsigned long long) const;
-#endif
-
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
- double) const;
-
- template
- ostreambuf_iterator<C>
- num_put<C, ostreambuf_iterator<C> >::
- _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
- long double) const;
-#endif
-_GLIBCXX_END_NAMESPACE_LDBL
// time_get and time_put
#if ! _GLIBCXX_USE_CXX11_ABI
@@ -250,16 +135,6 @@ _GLIBCXX_END_NAMESPACE_CXX11
const numpunct<C>&
use_facet<numpunct<C> >(const locale&);
-#if ! _GLIBCXX_USE_CXX11_ABI
- template
- const num_put<C>&
- use_facet<num_put<C> >(const locale&);
-
- template
- const num_get<C>&
- use_facet<num_get<C> >(const locale&);
-#endif
-
template
const moneypunct<C, true>&
use_facet<moneypunct<C, true> >(const locale&);
@@ -268,14 +143,6 @@ _GLIBCXX_END_NAMESPACE_CXX11
const moneypunct<C, false>&
use_facet<moneypunct<C, false> >(const locale&);
- template
- const money_put<C>&
- use_facet<money_put<C> >(const locale&);
-
- template
- const money_get<C>&
- use_facet<money_get<C> >(const locale&);
-
#if ! _GLIBCXX_USE_CXX11_ABI
template
const __timepunct<C>&
@@ -313,28 +180,10 @@ _GLIBCXX_END_NAMESPACE_CXX11
bool
has_facet<numpunct<C> >(const locale&);
-#if ! _GLIBCXX_USE_CXX11_ABI
- template
- bool
- has_facet<num_put<C> >(const locale&);
-
- template
- bool
- has_facet<num_get<C> >(const locale&);
-#endif
-
template
bool
has_facet<moneypunct<C> >(const locale&);
- template
- bool
- has_facet<money_put<C> >(const locale&);
-
- template
- bool
- has_facet<money_get<C> >(const locale&);
-
#if ! _GLIBCXX_USE_CXX11_ABI
template
bool
@@ -380,45 +229,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
} // namespace
// XXX GLIBCXX_ABI Deprecated
-#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char \
- && _GLIBCXX_USE_CXX11_ABI == 0
-
-#pragma GCC diagnostic ignored "-Wattribute-alias"
-
-#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
-
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_,
- _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
- _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
- _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs,
- _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs,
- _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs);
-
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && ! _GLIBCXX_USE_CXX11_ABI
+#include "compatibility-ldbl-facets-aliases.h"
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff --git a/libstdc++-v3/src/c++11/wlocale-inst.cc b/libstdc++-v3/src/c++11/wlocale-inst.cc
index 3a54fb51aab..a9a246f8f97 100644
--- a/libstdc++-v3/src/c++11/wlocale-inst.cc
+++ b/libstdc++-v3/src/c++11/wlocale-inst.cc
@@ -33,47 +33,4 @@
#ifdef _GLIBCXX_USE_WCHAR_T
#define C wchar_t
#include "locale-inst.cc"
-
-// XXX GLIBCXX_ABI Deprecated
-#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
-
-#pragma GCC diagnostic ignored "-Wattribute-alias"
-
-#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
-
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
- _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES4_S4_RSt8ios_basewT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES4_S4_RSt8ios_basewT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES3_S3_RSt8ios_basewT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES4_S4_RSt8ios_basewT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES3_S3_RSt8ios_basewT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES4_S4_RSt8ios_basewT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES3_S3_RSt8ios_basewT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES4_S4_RSt8ios_basewcT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_,
- _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIeEES3_S3_RSt8ios_basewcT_);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
- _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
- _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
- _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
-_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
- _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
-
-#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-#endif
+#endif // _GLIBCXX_USE_WCHAR_T