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]

Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)


And this is a robustness change that I ended up not needing, but still makes sense.
commit 3099f644d5427e1db3b4041ca4ed779ef213b6a0
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 19 11:34:46 2013 -0400

    	* pt.c (retrieve_specialization): Handle null tmpl argument.

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 531d860..d56ffed 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1009,6 +1009,9 @@ optimize_specialization_lookup_p (tree tmpl)
 static tree
 retrieve_specialization (tree tmpl, tree args, hashval_t hash)
 {
+  if (tmpl == NULL_TREE)
+    return NULL_TREE;
+
   if (args == error_mark_node)
     return NULL_TREE;
 

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