Commit 1bc0793e by Nathan Sidwell Committed by Nathan Sidwell

pt.c (lookup_template_class): Remove abort.

	* pt.c (lookup_template_class): Remove abort.
	* tree.c (get_type_decl): Allow error_mark_node.

From-SVN: r36134
parent 258451c8
2000-09-04 Nathan Sidwell <nathan@codesourcery.com> 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 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
TEMPLATE_ID_EXPRs. TEMPLATE_ID_EXPRs.
......
...@@ -3770,14 +3770,12 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope) ...@@ -3770,14 +3770,12 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
d1 = DECL_NAME (template); d1 = DECL_NAME (template);
context = DECL_CONTEXT (template); context = DECL_CONTEXT (template);
} }
else
my_friendly_abort (272);
/* With something like `template <class T> class X class X { ... };' /* With something like `template <class T> class X class X { ... };'
we could end up with D1 having nothing but an IDENTIFIER_VALUE. 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, 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 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) if (! template)
{ {
cp_error ("`%T' is not a template", d1); cp_error ("`%T' is not a template", d1);
......
...@@ -1846,6 +1846,8 @@ get_type_decl (t) ...@@ -1846,6 +1846,8 @@ get_type_decl (t)
return t; return t;
if (TYPE_P (t)) if (TYPE_P (t))
return TYPE_STUB_DECL (t); return TYPE_STUB_DECL (t);
if (t == error_mark_node)
return t;
my_friendly_abort (42); my_friendly_abort (42);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment