diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-03-11 15:43:14 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-11 15:43:14 +0000 |
commit | 436f8a4ce077dc372f70d1b57ab693c4aa0c6c6d (patch) | |
tree | 06a7a25a0f012883df97a7adf593d48822400080 /gcc/cp/decl2.c | |
parent | 1be4def3c6aa88e74c2a74a445405191706e323e (diff) | |
download | gcc-436f8a4ce077dc372f70d1b57ab693c4aa0c6c6d.zip gcc-436f8a4ce077dc372f70d1b57ab693c4aa0c6c6d.tar.gz gcc-436f8a4ce077dc372f70d1b57ab693c4aa0c6c6d.tar.bz2 |
re PR c++/8700 (unhelpful error message for binding temp to reference)
PR c++/8700
* call.c (convert_class_to_reference): Adjust usage of
splice_viable.
(any_viable): Remove.
(splice_viable): Combine with any_viable.
(print_z_candidates): Avoid printing duplicates.
(build_user_type_conversion_1): Adjust usage of splice_viable.
(build_new_function_call): Likewise.
(build_operator_new_call): Likewise.
(build_object_call): Likewise.
(build_conditional_expr): Likewise.
(build_new_op): Likewise.
(build_new_method_call): Likewise.
(joust): Remove spurious comment.
* cp-tree.h (DECL_FRIENDLIST): Correct documentation.
* decl2.c (arg_assoc_class): Simplify.
* friend.c (add_friend): Likewise.
From-SVN: r64173
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 6a4250e..c2f1f6c 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3936,13 +3936,12 @@ arg_assoc_class (struct arg_lookup *k, tree type) /* Process friends. */ for (list = DECL_FRIENDLIST (TYPE_MAIN_DECL (type)); list; list = TREE_CHAIN (list)) - if (k->name == TREE_PURPOSE (list)) - for (friends = TREE_VALUE (list); friends; + if (k->name == FRIEND_NAME (list)) + for (friends = FRIEND_DECLS (list); friends; friends = TREE_CHAIN (friends)) /* Only interested in global functions with potentially hidden (i.e. unqualified) declarations. */ - if (TREE_PURPOSE (friends) == error_mark_node && TREE_VALUE (friends) - && decl_namespace (TREE_VALUE (friends)) == context) + if (decl_namespace (TREE_VALUE (friends)) == context) if (add_function (k, TREE_VALUE (friends))) return true; |