From c2e63b4c69a0c31ed346dcba895e4dc49d9c8855 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 3 May 1999 12:20:47 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/init.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2caad4ec756..231047669dd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-05-02 Martin von Löwis + + * init.c (build_member_call): Lookup names coming from + namespace-scoped LOOKUP_EXPR. + 1999-05-03 Jim Blandy * gxxint.texi: Add documentation for 'I'. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 492a1ce0447..e9fe895da05 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); } -- 2.30.2