This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] GTY skip


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)
   {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]