]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (lookup_template_class): Remove abort.
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 4 Sep 2000 10:28:11 +0000 (10:28 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 4 Sep 2000 10:28:11 +0000 (10:28 +0000)
* pt.c (lookup_template_class): Remove abort.
* tree.c (get_type_decl): Allow error_mark_node.

From-SVN: r36134

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

index 3d01f81feb78dd373f2250f14a09f50e314c7775..c99b9a01fcb66051340432f5aadf63e07581bc26 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * pt.c (lookup_template_class): Remove abort.
+       * tree.c (get_type_decl): Allow error_mark_node.
+
 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
 
        * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
index 9da72eeed919053d89eefd572313833ded3c101a..abf4f9b2d87ed54c512dd51ffa87b77f756e0362 100644 (file)
@@ -3770,14 +3770,12 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
       d1 = DECL_NAME (template);
       context = DECL_CONTEXT (template);
     }
-  else
-    my_friendly_abort (272);
 
   /* With something like `template <class T> class X class X { ... };'
      we could end up with D1 having nothing but an IDENTIFIER_VALUE.
      We don't want to do that, but we have to deal with the situation,
      so let's give them some syntax errors to chew on instead of a
-     crash.  */
+     crash. Alternatively D1 might not be a template type at all.  */
   if (! template)
     {
       cp_error ("`%T' is not a template", d1);
index 009cb0e388e3eee31c66f8942f91772b45e4e681..371f00f4792a1f6b72b73308afc8eb2c25eebfa5 100644 (file)
@@ -1846,6 +1846,8 @@ get_type_decl (t)
     return t;
   if (TYPE_P (t))
     return TYPE_STUB_DECL (t);
+  if (t == error_mark_node)
+    return t;
   
   my_friendly_abort (42);