From df6d9c7f6af7a59d57caa09bd04265901065bc64 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 20 Mar 2015 13:26:55 +0000 Subject: [PATCH] c++config (__gnu_cxx::__cxx11): Define new namespace. * include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace. * include/ext/codecvt_specializations.h (encoding_state, encoding_char_traits): Remove abi-tag and use inline namespace. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line. From-SVN: r221533 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/include/bits/c++config | 4 ++++ libstdc++-v3/include/ext/codecvt_specializations.h | 6 ++++-- libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6836423e7d1..ac13084ae38 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2015-03-20 Jonathan Wakely + + * include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace. + * include/ext/codecvt_specializations.h (encoding_state, + encoding_char_traits): Remove abi-tag and use inline namespace. + * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line. + 2015-03-19 Jason Merrill * config/locale/gnu/messages_members.cc: Revert abi-tag change. diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index eebe34c604c..ae3065feaae 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -217,6 +217,10 @@ namespace std { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} # define _GLIBCXX_NAMESPACE_CXX11 __cxx11:: # define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 { # define _GLIBCXX_END_NAMESPACE_CXX11 } diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h index d9f6630ce0f..34e90bdf3f1 100644 --- a/libstdc++-v3/include/ext/codecvt_specializations.h +++ b/libstdc++-v3/include/ext/codecvt_specializations.h @@ -41,13 +41,14 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { +_GLIBCXX_BEGIN_NAMESPACE_CXX11 _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Extension to use iconv for dealing with character encodings. // This includes conversions and comparisons between various character // sets. This object encapsulates data that may need to be shared between // char_traits, codecvt and ctype. - class _GLIBCXX_DEFAULT_ABI_TAG encoding_state + class encoding_state { public: // Types: @@ -207,7 +208,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // associated fpos for the position type, all other // bits equivalent to the required char_traits instantiations. template - struct _GLIBCXX_DEFAULT_ABI_TAG encoding_char_traits + struct encoding_char_traits : public std::char_traits<_CharT> { typedef encoding_state state_type; @@ -215,6 +216,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; _GLIBCXX_END_NAMESPACE_VERSION +_GLIBCXX_END_NAMESPACE_CXX11 } // namespace diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc index d7a0c568681..dd19f1406b1 100644 --- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc +++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc @@ -25,4 +25,4 @@ #include -// { dg-error "multiple inlined namespaces" "" { target *-*-* } 318 } +// { dg-error "multiple inlined namespaces" "" { target *-*-* } 322 } -- 2.30.2