From d5614afb57da11705ce88e6646bcd33ef67eb8ab Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 7 Feb 2002 19:49:10 +0000 Subject: re PR c++/109 (g++ 2.95.2 can't handle dependent friend member functions) cp: PR c++/109 * decl.c (grokdeclarator): Allow friend declarations from dependant types. * decl2.c (handle_class_head): Don't push into template parm contexts. * pt.c (push_template_decl_real): Template parm contexts are never being defined. testsuite: * g++.dg/template/friend4.C: New test. From-SVN: r49589 --- gcc/cp/pt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/cp/pt.c') diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5084f72..9e5b20c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2571,7 +2571,9 @@ push_template_decl_real (decl, is_friend) if (!ctx || TREE_CODE (ctx) == FUNCTION_DECL - || TYPE_BEING_DEFINED (ctx) + || (TREE_CODE (ctx) != TEMPLATE_TYPE_PARM + && TREE_CODE (ctx) != BOUND_TEMPLATE_TEMPLATE_PARM + && TYPE_BEING_DEFINED (ctx)) || (is_friend && !DECL_TEMPLATE_INFO (decl))) { if (DECL_LANG_SPECIFIC (decl) -- cgit v1.1