public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Bump version namespace and remove _Rb_tree useless template parameter
Date: Thu, 04 May 2017 21:09:00 -0000	[thread overview]
Message-ID: <64a28bc2-0d9c-e83b-b582-5baac8470d82@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

Hi

     Here is the patch to remove the useless _Is_pod_comparator 
_Rb_tree_impl template parameter. As this is an ABI breaking change it 
is limited to the versioned namespace mode and the patch also bump the 
namespace version.

     Working on this patch I wonder if the gnu-versioned-namespace.ver 
is really up to date. The list of export expressions is far smaller than 
the one in gnu.ver. Would the testsuite show that some symbols are not 
properly exported ?

     Bump version namespace.
     * config/abi/pre/gnu-versioned-namespace.ver: Bump version namespace
     from __7 to __8. Bump GLIBCXX_7.0 into GLIBCXX_8.0.
     * include/bits/c++config: Adapt.
     * include/bits/regex.h: Adapt.
     * include/experimental/bits/fs_fwd.h: Adapt.
     * include/experimental/bits/lfts_config.h: Adapt.
     * include/std/variant: Adapt.
     * python/libstdcxx/v6/printers.py: Adapt.
     * testsuite/libstdc++-prettyprinters/48362.cc: Adapt.
     * include/bits/stl_tree.h (_Rb_tree_impl<>): Remove _Is_pod_comparator
     template parameter when version namespace is active.

Tested under Linux x86_64 with version namespace.

Ok to commit ?

François



[-- Attachment #2: rbtree.patch --]
[-- Type: text/x-patch, Size: 12821 bytes --]

diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
index 5fc627c..1721810 100644
--- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
@@ -19,7 +19,7 @@
 ## with this library; see the file COPYING3.  If not see
 ## <http://www.gnu.org/licenses/>.
 
-GLIBCXX_7.0 {
+GLIBCXX_8.0 {
 
   global:
 
@@ -27,7 +27,7 @@ GLIBCXX_7.0 {
     extern "C++"
     {
       std::*;
-      std::__7::*;
+      std::__8::*;
       std::random_device::*
     };
 
@@ -60,7 +60,7 @@ GLIBCXX_7.0 {
     # vtable
     _ZTVSt*;
     _ZTVNSt*;
-    _ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]EEEE;
+    _ZTVN9__gnu_cxx3__818stdio_sync_filebufI[cw]NSt3__811char_traitsI[cw]EEEE;
 
     # thunk
     _ZTv0_n12_NS*;
@@ -75,51 +75,51 @@ GLIBCXX_7.0 {
     _ZTSNSt*;
 
     # locale
-    _ZNSt3__79has_facetINS_*;
+    _ZNSt3__89has_facetINS_*;
 
     # hash
-    _ZNSt8__detail3__712__prime_listE;
-    _ZNSt3tr18__detail3__712__prime_listE;
+    _ZNSt8__detail3__812__prime_listE;
+    _ZNSt3tr18__detail3__812__prime_listE;
 
     # thread/mutex/condition_variable/future
     __once_proxy;
 
     # std::__detail::_List_node_base
-    _ZNSt8__detail3__715_List_node_base7_M_hook*;
-    _ZNSt8__detail3__715_List_node_base9_M_unhookEv;
-    _ZNSt8__detail3__715_List_node_base10_M_reverseEv;
-    _ZNSt8__detail3__715_List_node_base11_M_transfer*;
-    _ZNSt8__detail3__715_List_node_base4swapER*;
+    _ZNSt8__detail3__815_List_node_base7_M_hook*;
+    _ZNSt8__detail3__815_List_node_base9_M_unhookEv;
+    _ZNSt8__detail3__815_List_node_base10_M_reverseEv;
+    _ZNSt8__detail3__815_List_node_base11_M_transfer*;
+    _ZNSt8__detail3__815_List_node_base4swapER*;
 
     # std::__convert_to_v
-    _ZNSt3__714__convert_to_v*;
+    _ZNSt3__814__convert_to_v*;
 
     # std::__copy_streambufs
-    _ZNSt3__717__copy_streambufsI*;
-    _ZNSt3__721__copy_streambufs_eofI*;
+    _ZNSt3__817__copy_streambufsI*;
+    _ZNSt3__821__copy_streambufs_eofI*;
 
     # __gnu_cxx::__atomic_add
     # __gnu_cxx::__exchange_and_add
-    _ZN9__gnu_cxx3__712__atomic_addEPV[il][il];
-    _ZN9__gnu_cxx3__718__exchange_and_addEPV[li][il];
+    _ZN9__gnu_cxx3__812__atomic_addEPV[il][il];
+    _ZN9__gnu_cxx3__818__exchange_and_addEPV[li][il];
 
     # __gnu_cxx::__pool
-    _ZN9__gnu_cxx3__76__poolILb[01]EE13_M_initializeEv;
-    _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reserve_blockE[jmy][jmy];
-    _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reclaim_blockEPc[jmy];
-    _ZN9__gnu_cxx3__76__poolILb[01]EE10_M_destroyEv;
-    _ZN9__gnu_cxx3__76__poolILb1EE16_M_get_thread_idEv;
+    _ZN9__gnu_cxx3__86__poolILb[01]EE13_M_initializeEv;
+    _ZN9__gnu_cxx3__86__poolILb[01]EE16_M_reserve_blockE[jmy][jmy];
+    _ZN9__gnu_cxx3__86__poolILb[01]EE16_M_reclaim_blockEPc[jmy];
+    _ZN9__gnu_cxx3__86__poolILb[01]EE10_M_destroyEv;
+    _ZN9__gnu_cxx3__86__poolILb1EE16_M_get_thread_idEv;
 
-    _ZN9__gnu_cxx3__717__pool_alloc_base9_M_refillE[jmy];
-    _ZN9__gnu_cxx3__717__pool_alloc_base16_M_get_free_listE[jmy];
-    _ZN9__gnu_cxx3__717__pool_alloc_base12_M_get_mutexEv;
+    _ZN9__gnu_cxx3__817__pool_alloc_base9_M_refillE[jmy];
+    _ZN9__gnu_cxx3__817__pool_alloc_base16_M_get_free_listE[jmy];
+    _ZN9__gnu_cxx3__817__pool_alloc_base12_M_get_mutexEv;
 
-    _ZN9__gnu_cxx3__79free_list6_M_getE[jmy];
-    _ZN9__gnu_cxx3__79free_list8_M_clearEv;
+    _ZN9__gnu_cxx3__89free_list6_M_getE[jmy];
+    _ZN9__gnu_cxx3__89free_list8_M_clearEv;
 
     # __gnu_cxx::stdio_sync_filebuf
-    _ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]St3__711char_traitsI[cw]EEE;
-    _ZN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]EEE[5-9]*;
+    _ZTVN9__gnu_cxx3__818stdio_sync_filebufI[cw]St3__811char_traitsI[cw]EEE;
+    _ZN9__gnu_cxx3__818stdio_sync_filebufI[cw]NSt3__811char_traitsI[cw]EEE[5-9]*;
 
     # debug mode
     _ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv;
@@ -249,7 +249,7 @@ CXXABI_2.0 {
     _ZSt15_Fnv_hash_bytesPKv*;
 
     # __gnu_cxx::_verbose_terminate_handler()
-    _ZN9__gnu_cxx3__727__verbose_terminate_handlerEv;
+    _ZN9__gnu_cxx3__827__verbose_terminate_handlerEv;
 
     # *_type_info classes, ctor and dtor
     _ZN10__cxxabiv117__array_type_info*;
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 8ca6b03..3e39050 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -276,55 +276,55 @@ namespace __gnu_cxx
 
 namespace std
 {
-  inline namespace __7 { }
+  inline namespace __8 { }
 
-  namespace rel_ops { inline namespace __7 { } }
+  namespace rel_ops { inline namespace __8 { } }
 
   namespace tr1
   {
-    inline namespace __7 { }
-    namespace placeholders { inline namespace __7 { } }
-    namespace regex_constants { inline namespace __7 { } }
-    namespace __detail { inline namespace __7 { } }
+    inline namespace __8 { }
+    namespace placeholders { inline namespace __8 { } }
+    namespace regex_constants { inline namespace __8 { } }
+    namespace __detail { inline namespace __8 { } }
   }
 
   namespace tr2
-  { inline namespace __7 { } }
+  { inline namespace __8 { } }
 
-  namespace decimal { inline namespace __7 { } }
+  namespace decimal { inline namespace __8 { } }
 
 #if __cplusplus >= 201103L
-  namespace chrono { inline namespace __7 { } }
-  namespace placeholders { inline namespace __7 { } }
-  namespace regex_constants { inline namespace __7 { } }
-  namespace this_thread { inline namespace __7 { } }
+  namespace chrono { inline namespace __8 { } }
+  namespace placeholders { inline namespace __8 { } }
+  namespace regex_constants { inline namespace __8 { } }
+  namespace this_thread { inline namespace __8 { } }
 
 #if __cplusplus >= 201402L
   inline namespace literals {
-    inline namespace chrono_literals { inline namespace __7 { } }
-    inline namespace complex_literals { inline namespace __7 { } }
-    inline namespace string_literals { inline namespace __7 { } }
+    inline namespace chrono_literals { inline namespace __8 { } }
+    inline namespace complex_literals { inline namespace __8 { } }
+    inline namespace string_literals { inline namespace __8 { } }
 #if __cplusplus > 201402L
-    inline namespace string_view_literals { inline namespace __7 { } }
+    inline namespace string_view_literals { inline namespace __8 { } }
 #endif // C++17
   }
 #endif // C++14
 #endif // C++11
 
   namespace __detail {
-    inline namespace __7 { }
+    inline namespace __8 { }
 #if __cplusplus > 201402L
-    namespace __variant { inline namespace __7 { } }
+    namespace __variant { inline namespace __8 { } }
 #endif
   }
 }
 
 namespace __gnu_cxx
 {
-  inline namespace __7 { }
-  namespace __detail { inline namespace __7 { } }
+  inline namespace __8 { }
+  namespace __detail { inline namespace __8 { } }
 }
-# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 {
+# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __8 {
 # define _GLIBCXX_END_NAMESPACE_VERSION }
 #else
 # define _GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -341,7 +341,7 @@ namespace std
   namespace __cxx1998
   {
 # if _GLIBCXX_INLINE_VERSION
-  inline namespace __7 { }
+  inline namespace __8 { }
 # endif
 
 # if _GLIBCXX_USE_CXX11_ABI
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 60837ea..15f0d08 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -773,7 +773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
 	__detail::_RegexExecutorPolicy, bool>
 	friend bool __detail::
 #if _GLIBCXX_INLINE_VERSION
-        __7:: // Required due to PR c++/59256
+        __8:: // Required due to PR c++/59256
 #endif
 	__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
                           const basic_regex<_Cp, _Rp>&,
@@ -1867,7 +1867,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
 	__detail::_RegexExecutorPolicy, bool>
 	friend bool __detail::
 #if _GLIBCXX_INLINE_VERSION
-        __7:: // Required due to PR c++/59256
+        __8:: // Required due to PR c++/59256
 #endif
 	__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
                           const basic_regex<_Cp, _Rp>&,
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index ce7ecda..aedee06 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -671,9 +671,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	}
 
     protected:
+#if _GLIBCXX_INLINE_VERSION
+      template<typename _Key_compare>
+#else
       // Unused _Is_pod_comparator is kept as it is part of mangled name.
       template<typename _Key_compare,
 	       bool /* _Is_pod_comparator */ = __is_pod(_Key_compare)>
+#endif
 	struct _Rb_tree_impl
 	: public _Node_allocator
 	, public _Rb_tree_key_compare<_Key_compare>
diff --git a/libstdc++-v3/include/experimental/bits/fs_fwd.h b/libstdc++-v3/include/experimental/bits/fs_fwd.h
index 3ec327e..c5aeefe 100644
--- a/libstdc++-v3/include/experimental/bits/fs_fwd.h
+++ b/libstdc++-v3/include/experimental/bits/fs_fwd.h
@@ -47,7 +47,7 @@ namespace filesystem
 inline namespace v1
 {
 #if _GLIBCXX_INLINE_VERSION
-inline namespace __7 { }
+inline namespace __8 { }
 #endif
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
diff --git a/libstdc++-v3/include/experimental/bits/lfts_config.h b/libstdc++-v3/include/experimental/bits/lfts_config.h
index a9faa47..ecc40c4 100644
--- a/libstdc++-v3/include/experimental/bits/lfts_config.h
+++ b/libstdc++-v3/include/experimental/bits/lfts_config.h
@@ -39,24 +39,24 @@ namespace chrono
 {
 namespace experimental
 {
-inline namespace fundamentals_v1 { inline namespace __7 { } }
-inline namespace fundamentals_v2 { inline namespace __7 { } }
+inline namespace fundamentals_v1 { inline namespace __8 { } }
+inline namespace fundamentals_v2 { inline namespace __8 { } }
 } // namespace experimental
 } // namespace chrono
 
 namespace experimental
 {
 inline namespace fundamentals_v1 {
-  inline namespace __7 { }
-  namespace __detail { inline namespace __7 { } }
+  inline namespace __8 { }
+  namespace __detail { inline namespace __8 { } }
 }
 inline namespace fundamentals_v2 {
-  inline namespace __7 { }
-  namespace pmr { inline namespace __7 { } }
-  namespace __detail { inline namespace __7 { } }
+  inline namespace __8 { }
+  namespace pmr { inline namespace __8 { } }
+  namespace __detail { inline namespace __8 { } }
 } // namespace fundamentals_v2
 inline namespace literals { inline namespace string_view_literals {
-  inline namespace __7 { }
+  inline namespace __8 { }
 } } // namespace literals::string_view_literals
 } // namespace experimental
 } // namespace std
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 272b2a6..0e04a82 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -1154,14 +1154,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       template<size_t _Np, typename _Vp>
 	friend constexpr decltype(auto) __detail::__variant::
 #if _GLIBCXX_INLINE_VERSION
-        __7:: // Required due to PR c++/59256
+        __8:: // Required due to PR c++/59256
 #endif
 	__get(_Vp&& __v);
 
       template<typename _Vp>
 	friend void* __detail::__variant::
 #if _GLIBCXX_INLINE_VERSION
-        __7:: // Required due to PR c++/59256
+        __8:: // Required due to PR c++/59256
 #endif
         __get_storage(_Vp&& __v);
 
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index a67b27a..8122cf8 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -99,7 +99,7 @@ def find_type(orig, name):
             raise ValueError("Cannot find type %s::%s" % (str(orig), name))
         typ = field.type
 
-_versioned_namespace = '__7::'
+_versioned_namespace = '__8::'
 
 # Test if a type is a given template instantiation.
 def is_specialization_of(type, template_name):
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
index db9fd9a..ab00e8a 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
@@ -29,7 +29,7 @@ main()
 // { dg-final { note-test t1 {empty std::tuple} } }
 
   std::tuple<std::string, int, std::tuple<>> t2{ "Johnny", 5, {} };
-// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = {<std::(__7::)?tuple<>> = empty std::tuple, <No data fields>}}} } }
+// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = {<std::(__8::)?tuple<>> = empty std::tuple, <No data fields>}}} } }
 
   std::cout << "\n";
   return 0; // Mark SPOT


             reply	other threads:[~2017-05-04 20:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 21:09 François Dumont [this message]
2017-05-05 13:14 ` Jonathan Wakely
2017-05-09 20:13   ` François Dumont
2017-05-10  9:16     ` Jonathan Wakely
2017-05-10  9:26       ` Paolo Carlini
2017-05-10  9:37         ` Jonathan Wakely
2017-05-10 20:45           ` François Dumont
2017-05-11 20:42             ` François Dumont
2017-05-16 12:13               ` Jonathan Wakely
2017-05-16 13:12                 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64a28bc2-0d9c-e83b-b582-5baac8470d82@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).