[gcc r17-3514] libstdc++: remove the gnu++11 in check performance script
Yuao Ma
yuao@gcc.gnu.org
Fri Aug 21 14:21:51 GMT 2026
https://gcc.gnu.org/g:82b7a11b213b1e8edc54f48d258efd58dd0f7ff6
commit r17-3514-g82b7a11b213b1e8edc54f48d258efd58dd0f7ff6
Author: Yuao Ma <c8ef@outlook.com>
Date: Fri Aug 21 21:29:17 2026 +0800
libstdc++: remove the gnu++11 in check performance script
Nowadays gcc's default c++ version is gnu++20, maybe we should just use
this in performance check as well.
libstdc++-v3/ChangeLog:
* scripts/check_performance: Remove gnu++11 flag.
* testsuite/util/native_type/native_hash_map.hpp: Adjust rebind
usage.
* testsuite/util/native_type/native_hash_multimap.hpp: Ditto.
* testsuite/util/native_type/native_hash_set.hpp: Ditto.
* testsuite/util/native_type/native_map.hpp: Ditto.
* testsuite/util/native_type/native_multimap.hpp: Ditto.
* testsuite/util/native_type/native_set.hpp: Ditto.
Diff:
---
libstdc++-v3/scripts/check_performance | 2 +-
libstdc++-v3/testsuite/util/native_type/native_hash_map.hpp | 2 +-
libstdc++-v3/testsuite/util/native_type/native_hash_multimap.hpp | 4 +---
libstdc++-v3/testsuite/util/native_type/native_hash_set.hpp | 2 +-
libstdc++-v3/testsuite/util/native_type/native_map.hpp | 2 +-
libstdc++-v3/testsuite/util/native_type/native_multimap.hpp | 7 ++-----
libstdc++-v3/testsuite/util/native_type/native_set.hpp | 2 +-
7 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/libstdc++-v3/scripts/check_performance b/libstdc++-v3/scripts/check_performance
index 4831ed71b6fc..eb6adbc5ec69 100755
--- a/libstdc++-v3/scripts/check_performance
+++ b/libstdc++-v3/scripts/check_performance
@@ -32,7 +32,7 @@ SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
-Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
ST_FLAG="-static"
LINK=$SH_FLAG
-CXX="$COMPILER $INCLUDES $FLAGS -std=gnu++11 $CXXFLAGS $LINK"
+CXX="$COMPILER $INCLUDES $FLAGS $CXXFLAGS $LINK"
LIBS="./libtestc++.a"
TESTS_FILE="testsuite_files_performance"
diff --git a/libstdc++-v3/testsuite/util/native_type/native_hash_map.hpp b/libstdc++-v3/testsuite/util/native_type/native_hash_map.hpp
index 1eb9851c8869..d374455539dd 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_hash_map.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_hash_map.hpp
@@ -50,7 +50,7 @@ namespace __gnu_pbds
{
#define PB_DS_BASE_C_DEC \
std::tr1::__unordered_map<Key, Data, Hash_Fn, Eq_Fn, \
- typename _Alloc::template rebind<std::pair<const Key, Data> >::other, Cache_Hash>
+ typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<std::pair<const Key, Data> >::other, Cache_Hash>
template<typename Key,
typename Data,
diff --git a/libstdc++-v3/testsuite/util/native_type/native_hash_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/native_hash_multimap.hpp
index 35f16de8a1c3..f6808aab9d16 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_hash_multimap.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_hash_multimap.hpp
@@ -70,9 +70,7 @@ namespace __gnu_pbds
typedef typename base_type::iterator iterator;
typedef typename base_type::const_iterator const_iterator;
- typedef
- typename allocator::template rebind<pair_type>::other::const_reference
- const_reference;
+ typedef const pair_type& const_reference;
native_hash_multimap() : base_type(Init_Size)
{ }
diff --git a/libstdc++-v3/testsuite/util/native_type/native_hash_set.hpp b/libstdc++-v3/testsuite/util/native_type/native_hash_set.hpp
index 75ebed43110e..a2b2be5f3a04 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_hash_set.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_hash_set.hpp
@@ -50,7 +50,7 @@ namespace __gnu_pbds
{
#define PB_DS_BASE_C_DEC \
std::tr1::__unordered_set<Key, Hash_Fn, Eq_Fn, \
- typename _Alloc::template rebind<Key>::other, Cache_Hash>
+ typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<Key>::other, Cache_Hash>
template<typename Key,
size_t Init_Size = 8,
diff --git a/libstdc++-v3/testsuite/util/native_type/native_map.hpp b/libstdc++-v3/testsuite/util/native_type/native_map.hpp
index 958553951b4c..72127f904464 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_map.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_map.hpp
@@ -50,7 +50,7 @@ namespace __gnu_pbds
{
#define PB_DS_BASE_C_DEC \
std::map<Key, Data, Cmp_Fn, \
-typename _Alloc::template rebind<std::pair<const Key, Data > >::other >
+typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<std::pair<const Key, Data > >::other >
template<typename Key, typename Data, class Cmp_Fn = std::less<Key>,
typename _Alloc = std::allocator<char> >
diff --git a/libstdc++-v3/testsuite/util/native_type/native_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/native_multimap.hpp
index 3646de930b4d..234b956fc603 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_multimap.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_multimap.hpp
@@ -48,7 +48,7 @@ namespace __gnu_pbds
{
#define PB_DS_BASE_C_DEC \
std::multimap<Key, Data, Less_Fn, \
- typename _Alloc::template rebind<std::pair<const Key, Data> >::other>
+ typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<std::pair<const Key, Data> >::other>
template<typename Key, typename Data, class Less_Fn = std::less<Key>,
typename _Alloc = std::allocator<char> >
@@ -62,10 +62,7 @@ namespace __gnu_pbds
typedef _Alloc allocator;
- typedef
- typename _Alloc::template rebind<
- std::pair<Key, Data> >::other::const_reference
- const_reference;
+ typedef const std::pair<Key, Data>& const_reference;
typedef typename base_type::iterator iterator;
typedef typename base_type::const_iterator const_iterator;
diff --git a/libstdc++-v3/testsuite/util/native_type/native_set.hpp b/libstdc++-v3/testsuite/util/native_type/native_set.hpp
index d382a3712266..59ce1f40808d 100644
--- a/libstdc++-v3/testsuite/util/native_type/native_set.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/native_set.hpp
@@ -48,7 +48,7 @@ namespace __gnu_pbds
namespace test
{
#define PB_DS_BASE_C_DEC \
- std::set<Key, Cmp_Fn, typename _Alloc::template rebind<Key>::other>
+ std::set<Key, Cmp_Fn, typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<Key>::other>
template<typename Key, class Cmp_Fn = std::less<Key>,
typename _Alloc = std::allocator<char> >
More information about the Libstdc++-cvs
mailing list