This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] GTY skip
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 May 2017 09:06:43 -0400
- Subject: [PATCH] GTY skip
- Authentication-results: sourceware.org; auth=none
gengtype doesn't understand about struct-scope for typedefs, and
consequently gets confused if multiple classes define the same-named
typedef. The regular default_hash_traits is invisible to gengtype, so
it doesn't barf on the first specialization, only on the second -- which
is what I'll be adding soon.
This patch tells gengtype to move along, nothing to see here.
Applied as obvious.
nathan
--
Nathan Sidwell
2017-05-09 Nathan Sidwell <nathan@acm.org>
* ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
typedefs.
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c (revision 247784)
+++ ipa-devirt.c (working copy)
@@ -138,10 +138,11 @@ struct type_pair
};
template <>
-struct default_hash_traits <type_pair> : typed_noop_remove <type_pair>
+struct default_hash_traits <type_pair>
+ : typed_noop_remove <type_pair>
{
- typedef type_pair value_type;
- typedef type_pair compare_type;
+ GTY((skip)) typedef type_pair value_type;
+ GTY((skip)) typedef type_pair compare_type;
static hashval_t
hash (type_pair p)
{