aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2011-04-28 18:08:43 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2011-04-28 20:08:43 +0200
commitf62cd40949d0219d9c2c6e24afb0377fcde9d0e3 (patch)
tree045a8de9c3dbb528cf40d3d494e26698cc1199b7 /gcc/cp/semantics.c
parentc6fc44f364be516ab4c2043de5d8999c961a279d (diff)
downloadgcc-f62cd40949d0219d9c2c6e24afb0377fcde9d0e3.zip
gcc-f62cd40949d0219d9c2c6e24afb0377fcde9d0e3.tar.gz
gcc-f62cd40949d0219d9c2c6e24afb0377fcde9d0e3.tar.bz2
re PR c++/48656 ([C++0x] cannot call member function without object)
Fix PR c++/48656 gcc/cp/ * semantics.c (finish_call_expr): Don't forget BASELINK nodes when considering call expressions involving a member function. gcc/testsuite/ * gcc/testsuite/g++.dg/template/inherit7.C: New test case. From-SVN: r173123
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c636412..722e57f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2039,7 +2039,8 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
is not included in *ARGS even though it is considered to
be part of the list of arguments. Note that this is
related to CWG issues 515 and 1005. */
- || ((TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE)
+ || (((TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE)
+ || BASELINK_P (fn))
&& current_class_ref
&& type_dependent_expression_p (current_class_ref)))
{