aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-11-18 14:31:10 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-11-18 14:31:10 +0000
commit1fcb9641fd21e8b01c8c0bf68debb50093af2fda (patch)
tree576b822340c4bbe0496edac99715696e9b6d8fc9 /gcc
parent4a353e1608a97ba1b3712c3130baed8eff8d0819 (diff)
downloadgcc-1fcb9641fd21e8b01c8c0bf68debb50093af2fda.zip
gcc-1fcb9641fd21e8b01c8c0bf68debb50093af2fda.tar.gz
gcc-1fcb9641fd21e8b01c8c0bf68debb50093af2fda.tar.bz2
PR 68406: Avoid problem with older host compilers
Older compilers require the Key typedef to be expanded for the traversal function templates. This patch uses the same approach as we did for hash_map. Tested on x86_64-linux-gnu. gcc/ PR bootstrap/68406 * hash-set.h (hash_set::traverse): Expand Key typedef. From-SVN: r230549
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/hash-set.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3c11fe..620a310 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-18 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR bootstrap/68406
+ * hash-set.h (hash_set::traverse): Expand Key typedef.
+
2015-11-18 Martin Liska <mliska@suse.cz>
* config/arm/arm.c (arm_valid_target_attribute_p): Finalize
diff --git a/gcc/hash-set.h b/gcc/hash-set.h
index 679d2b6..8a7c9a0 100644
--- a/gcc/hash-set.h
+++ b/gcc/hash-set.h
@@ -68,7 +68,7 @@ public:
/* Call the call back on each pair of key and value with the passed in
arg. */
- template<typename Arg, bool (*f)(const Key &, Arg)>
+ template<typename Arg, bool (*f)(const typename Traits::value_type &, Arg)>
void traverse (Arg a) const
{
for (typename hash_table<Traits>::iterator iter = m_table.begin ();