+Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * pt.c (finish_member_template_decl): Deal more gracefully with
+ invalid declarations.
+
Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
* call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
}
return NULL_TREE;
}
- else if (DECL_TEMPLATE_INFO (decl) &&
- !DECL_TEMPLATE_SPECIALIZATION (decl))
+ else if (DECL_TEMPLATE_INFO (decl))
{
- check_member_template (DECL_TI_TEMPLATE (decl));
- return DECL_TI_TEMPLATE (decl);
- }
+ if (!DECL_TEMPLATE_SPECIALIZATION (decl))
+ {
+ check_member_template (DECL_TI_TEMPLATE (decl));
+ return DECL_TI_TEMPLATE (decl);
+ }
+ else
+ return decl;
+ }
+ else
+ cp_error ("invalid member template declaration `%D'", decl);
+
- return decl;
+ return error_mark_node;
}
/* Returns the template nesting level of the indicated class TYPE.