diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2002-02-07 19:49:10 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2002-02-07 19:49:10 +0000 |
commit | d5614afb57da11705ce88e6646bcd33ef67eb8ab (patch) | |
tree | b7a3a796913e016fb175553b89fc5c74f709db2e /gcc/cp/pt.c | |
parent | 5d65aeb7e4432949ff6198d06b37c3ac1c58f1b7 (diff) | |
download | gcc-d5614afb57da11705ce88e6646bcd33ef67eb8ab.zip gcc-d5614afb57da11705ce88e6646bcd33ef67eb8ab.tar.gz gcc-d5614afb57da11705ce88e6646bcd33ef67eb8ab.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |