aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2003-07-25 10:20:09 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-07-25 10:20:09 +0000
commite710066d27bdcc5165a1feef691e11b90e8f5a1f (patch)
tree4d4166c519457a60f7accacb4309ef617a7d63fd /gcc
parenta91db711890ba12e2385bf10480a5f6c270c2e2f (diff)
downloadgcc-e710066d27bdcc5165a1feef691e11b90e8f5a1f.zip
gcc-e710066d27bdcc5165a1feef691e11b90e8f5a1f.tar.gz
gcc-e710066d27bdcc5165a1feef691e11b90e8f5a1f.tar.bz2
Revert patch for 11617 which accidently crept in
From-SVN: r69779
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/pt.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 013e805..f91dca0 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7150,7 +7150,8 @@ tsubst_qualified_id (tree qualified_id, tree args,
}
if (!BASELINK_P (name) && !DECL_P (expr))
- expr = lookup_qualified_name (scope, expr, /*is_type_p=*/0, false);
+ expr = lookup_qualified_name (scope, expr, /*is_type_p=*/0,
+ (complain & tf_error) != 0);
if (DECL_P (expr))
check_accessibility_of_qualified_id (expr,
/*object_type=*/NULL_TREE,
@@ -7167,9 +7168,7 @@ tsubst_qualified_id (tree qualified_id, tree args,
if (is_template)
expr = lookup_template_function (expr, template_args);
- if (expr == error_mark_node && complain & tf_error)
- nested_name_lookup_error (scope, TREE_OPERAND (qualified_id, 1));
- else if (TYPE_P (scope))
+ if (TYPE_P (scope))
{
expr = (adjust_result_of_qualified_name_lookup
(expr, scope, current_class_type));
@@ -7590,15 +7589,12 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
tree scope = DECL_INITIAL (decl);
tree name = DECL_NAME (decl);
- tree decl;
scope = tsubst_expr (scope, args, complain, in_decl);
- decl = lookup_qualified_name (scope, name,
- /*is_type_p=*/0, /*complain=*/false);
- if (decl == error_mark_node)
- nested_name_lookup_error (scope, name);
- else
- do_local_using_decl (decl);
+ do_local_using_decl (lookup_qualified_name (scope,
+ name,
+ /*is_type_p=*/0,
+ /*complain=*/true));
}
else
{
@@ -8256,15 +8252,18 @@ tsubst_copy_and_build (tree t,
scope is. */
tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0);
args = TREE_OPERAND (TREE_OPERAND (member, 1), 1);
- member = lookup_qualified_name (TREE_OPERAND (member, 0), tmpl,
- /*is_type=*/0, /*complain=*/false);
+ member = lookup_qualified_name (TREE_OPERAND (member, 0),
+ tmpl,
+ /*is_type=*/0,
+ /*complain=*/true);
if (BASELINK_P (member))
BASELINK_FUNCTIONS (member)
= build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
args);
else
{
- nested_name_lookup_error (TREE_TYPE (object), tmpl);
+ error ("`%D' is not a member of `%T'",
+ tmpl, TREE_TYPE (object));
return error_mark_node;
}
}