From ac2b322259b04b7c158c49a771f629430afaadeb Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Thu, 25 Dec 2003 16:28:50 +0000 Subject: PR c++/13268, c++/13339 PR c++/13268, c++/13339 * class.c (add_method): Return early when method is error_mark_node. * pt.c (tsubst_friend_function): Return early when new_friend is error_mark_node. From-SVN: r75022 --- gcc/cp/pt.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/cp/pt.c') diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e7a8863..3c0e7d8 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4897,6 +4897,9 @@ tsubst_friend_function (tree decl, tree args) Then, in S, template void f(int, U) is not an instantiation of anything. */ + if (new_friend == error_mark_node) + return error_mark_node; + DECL_USE_TEMPLATE (new_friend) = 0; if (TREE_CODE (decl) == TEMPLATE_DECL) { -- cgit v1.1