OSDN Git Service

* cp-tree.h (lang_type): Remove has_assignment and
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Mar 1999 01:10:13 +0000 (01:10 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Mar 1999 01:10:13 +0000 (01:10 +0000)
commita731c87f09320d4e77615a8e897be6d8713ade6c
treeafe04b327c1dd8e574626fedc7a32975682b1f90
parent79d5c0f3c96ae0255d041a8fbe8b50ac227128d1
* cp-tree.h (lang_type): Remove has_assignment and
has_real_assignment.  Add befriending_classes.
(TYPE_HAS_ASSIGNMENT): Remove.
(TYPE_HAS_REAL_ASSIGNMENT): Likewise.
(CLASSTYPE_BEFRIENDING_CLASSES): New macro.
(lang_decl): Document.
(DECL_BEFRIENDING_CLASSES): New macro.
(FRIEND_NAME): Move declaration to more obvious location.
(FRIEND_DECLS): Likewise.
* class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
* decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
(fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
(grok_op_properties): Likewise.
* friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
(add_friend): Likewise.  Don't do weird things with assignment
operators.  Update DECL_BEFRIENDING_CLASSES.
(add_friends): Don't do weird things with assignment operators.
(make_friend_class): Likewise.  Update
CLASSTYPE_BEFRIENDING_CLASSES.
* pt.c (instantiate_class_template): Don't set
TYPE_HAS_ASSIGNMENT.
(tsubst_copy): Substitute the TREE_TYPE for more unary
expressions.
* ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
* search.c (protected_accessible_p): New function.
(friend_accessible_p): Likewise.
(accessible_p): Use them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25940 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/friend.c
gcc/cp/pt.c
gcc/cp/ptree.c
gcc/cp/search.c
gcc/testsuite/g++.old-deja/g++.other/friend1.C