From 1ac198fadfe188f9e448c926b805ee54580a3034 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 4 Sep 2000 10:28:11 +0000 Subject: [PATCH] * pt.c (lookup_template_class): Remove abort. * tree.c (get_type_decl): Allow error_mark_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36134 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 4 +--- gcc/cp/tree.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3d01f81feb7..c99b9a01fcb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2000-09-04 Nathan Sidwell + * pt.c (lookup_template_class): Remove abort. + * tree.c (get_type_decl): Allow error_mark_node. + +2000-09-04 Nathan Sidwell + * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside TEMPLATE_ID_EXPRs. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 9da72eeed91..abf4f9b2d87 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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 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); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 009cb0e388e..371f00f4792 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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); -- 2.11.0