aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2003-12-25 16:28:50 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2003-12-25 08:28:50 -0800
commitac2b322259b04b7c158c49a771f629430afaadeb (patch)
tree9e63c348c0242d549efe192d37ce056146844149 /gcc/cp/pt.c
parent5a6159ddb9f1c5a0bf70ae1535023f8a19870251 (diff)
downloadgcc-ac2b322259b04b7c158c49a771f629430afaadeb.zip
gcc-ac2b322259b04b7c158c49a771f629430afaadeb.tar.gz
gcc-ac2b322259b04b7c158c49a771f629430afaadeb.tar.bz2
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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c3
1 files changed, 3 insertions, 0 deletions
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<int>, template <class U> 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)
{