]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fix thinko in last change
authorJason Merrill <jason@yorick.cygnus.com>
Sun, 8 Aug 1999 21:03:59 +0000 (21:03 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 8 Aug 1999 21:03:59 +0000 (17:03 -0400)
From-SVN: r28600

gcc/cp/ChangeLog
gcc/cp/pt.c

index 9269af0ab568d16cbb3abf5999a00fedbc5a8d43..bfebb6e241b9c0e1f0d5c201fea2630fe3b7b0a6 100644 (file)
@@ -3,6 +3,9 @@
        * decl.c (bad_specifiers): It's OK to have an EH spec on a function
        pointer.
 
+       * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
+       we're looking at a class.
+
        * decl.c (lookup_name_real): Set the complain flag if we're
        looking for a namespace member.
 
index 0a4e20693d595efb3115e0c5ed30b2ca718b85be..47fa99a5c43104860ec03794a33163cb30442116 100644 (file)
@@ -3574,6 +3574,7 @@ maybe_get_template_decl_from_type_decl (decl)
   return (decl != NULL_TREE
          && TREE_CODE (decl) == TYPE_DECL 
          && DECL_ARTIFICIAL (decl)
+         && CLASS_TYPE_P (TREE_TYPE (decl))
          && CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (decl))) 
     ? CLASSTYPE_TI_TEMPLATE (TREE_TYPE (decl)) : decl;
 }