diff options
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index ec8f4ab4ba6..09c1b4e6456 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -782,6 +782,9 @@ friend_accessible_p (tree scope, tree decl, tree type, tree otype) if (!scope) return 0; + if (is_global_friend (scope)) + return 1; + /* Is SCOPE itself a suitable P? */ if (TYPE_P (scope) && protected_accessible_p (decl, scope, type, otype)) return 1; @@ -1664,7 +1667,7 @@ lookup_fnfields_1 (tree type, tree name) if (CLASSTYPE_LAZY_MOVE_CTOR (type)) lazily_declare_fn (sfk_move_constructor, type); } - else if (name == ansi_assopname (NOP_EXPR)) + else if (name == cp_assignment_operator_id (NOP_EXPR)) { if (CLASSTYPE_LAZY_COPY_ASSIGN (type)) lazily_declare_fn (sfk_copy_assignment, type); |