aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>1999-05-03 12:20:47 +0000
committerMartin v. Löwis <loewis@gcc.gnu.org>1999-05-03 12:20:47 +0000
commitc2e63b4c69a0c31ed346dcba895e4dc49d9c8855 (patch)
tree023e5b890dc01cdf4f5ae5351d630a042c734e7a /gcc
parent01d903f487e78dca5609208e9bf35033fe22e2fe (diff)
downloadgcc-c2e63b4c69a0c31ed346dcba895e4dc49d9c8855.zip
gcc-c2e63b4c69a0c31ed346dcba895e4dc49d9c8855.tar.gz
gcc-c2e63b4c69a0c31ed346dcba895e4dc49d9c8855.tar.bz2
init.c (build_member_call): Lookup names coming from namespace-scoped LOOKUP_EXPR.
* init.c (build_member_call): Lookup names coming from namespace-scoped LOOKUP_EXPR. From-SVN: r26745
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/init.c13
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2caad4e..2310476 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
+
+ * init.c (build_member_call): Lookup names coming from
+ namespace-scoped LOOKUP_EXPR.
+
1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
* gxxint.texi: Add documentation for 'I'.
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 492a1ce..e9fe895 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1366,7 +1366,18 @@ build_member_call (type, name, parmlist)
{
/* 'name' already refers to the decls from the namespace, since we
hit do_identifier for template_ids. */
- my_friendly_assert (is_overloaded_fn (TREE_OPERAND (name, 0)), 980519);
+ method_name = TREE_OPERAND (name, 0);
+ /* FIXME: Since we don't do independent names right yet, the
+ name might also be a LOOKUP_EXPR. Once we resolve this to a
+ real decl earlier, this can go. This may happen during
+ tsubst'ing. */
+ if (TREE_CODE (method_name) == LOOKUP_EXPR)
+ {
+ method_name = lookup_namespace_name
+ (type, TREE_OPERAND (method_name, 0));
+ TREE_OPERAND (name, 0) = method_name;
+ }
+ my_friendly_assert (is_overloaded_fn (method_name), 980519);
return build_x_function_call (name, parmlist, current_class_ref);
}