summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-23 17:57:34 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-23 17:57:34 +0000
commitf30ba9ed4dadad75be02fff4e29b003961e13a6d (patch)
tree56ab9f810b9b068268bcb2c33f6c8668c9873fd3 /libstdc++-v3
parent080349751d856dc55e580c7400f8eeaf5ece66e8 (diff)
downloadgcc-f30ba9ed4dadad75be02fff4e29b003961e13a6d.tar.gz
* include/bits/functional_hash.h: Add specializations for __intN
types. * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp (__gnu_pbds): Guard against values that might exceed size_t's precision. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226117 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/bits/functional_hash.h17
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp15
3 files changed, 37 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c1c905207fc..152887b178f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2015-07-23 DJ Delorie <dj@redhat.com>
+
+ * include/bits/functional_hash.h: Add specializations for __intN
+ types.
+
+ * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp (__gnu_pbds):
+ Guard against values that might exceed size_t's precision.
+
2015-07-20 Jason Merrill <jason@redhat.com>
* include/bits/c++config: Fix abi_tag in special modes.
diff --git a/libstdc++-v3/include/bits/functional_hash.h b/libstdc++-v3/include/bits/functional_hash.h
index d94843f5172..3c962fc7a91 100644
--- a/libstdc++-v3/include/bits/functional_hash.h
+++ b/libstdc++-v3/include/bits/functional_hash.h
@@ -121,6 +121,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Explicit specialization for unsigned long long.
_Cxx_hashtable_define_trivial_hash(unsigned long long)
+#ifdef __GLIBCXX_TYPE_INT_N_0
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0)
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0 unsigned)
+#endif
+#ifdef __GLIBCXX_TYPE_INT_N_1
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1)
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1 unsigned)
+#endif
+#ifdef __GLIBCXX_TYPE_INT_N_2
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2)
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2 unsigned)
+#endif
+#ifdef __GLIBCXX_TYPE_INT_N_3
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3)
+ _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3 unsigned)
+#endif
+
#undef _Cxx_hashtable_define_trivial_hash
struct _Hash_impl
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
index b03d7a3a0de..4aaf3d30c63 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
@@ -270,18 +270,24 @@ namespace __gnu_pbds
/* 21 */ 15126ul,
/* 22 */ 24476ul,
/* 23 */ 39602ul,
- /* 24 */ 64079ul,
+ /* 24 */ 64079ul
+#if __SIZE_MAX__ > 0xfffful
+ ,
/* 25 */ 103681ul,
/* 26 */ 167761ul,
/* 27 */ 271442ul,
/* 28 */ 439204ul,
- /* 29 */ 710646ul,
+ /* 29 */ 710646ul
+#if __SIZE_MAX__ > 0xffffful
+ ,
/* 30 */ 1149851ul,
/* 31 */ 1860497ul,
/* 32 */ 3010349ul,
/* 33 */ 4870846ul,
/* 34 */ 7881196ul,
- /* 35 */ 12752042ul,
+ /* 35 */ 12752042ul
+#if __SIZE_MAX__ > 0xfffffful
+ ,
/* 36 */ 20633239ul,
/* 37 */ 33385282ul,
/* 38 */ 54018521ul,
@@ -294,6 +300,9 @@ namespace __gnu_pbds
/* 45 */ 1568397607ul,
/* 46 */ 2537720636ul,
/* 47 */ 4106118243ul
+#endif
+#endif
+#endif
/* Pot's good, let's play */
};