OSDN Git Service

revert accidental checkin
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jul 2006 22:02:56 +0000 (22:02 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jul 2006 22:02:56 +0000 (22:02 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115119 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/search.c

index 2af5e04..21d1b77 100644 (file)
@@ -792,12 +792,11 @@ friend_accessible_p (tree scope, tree decl, tree binfo)
     if (protected_accessible_p (decl, TREE_VALUE (t), binfo))
       return 1;
 
-  /* Nested classes have the same access as their enclosing types, as
+  /* Nested classes are implicitly friends of their enclosing types, as
      per core issue 45 (this is a change from the standard).  */
   if (TYPE_P (scope))
     for (t = TYPE_CONTEXT (scope); t && TYPE_P (t); t = TYPE_CONTEXT (t))
-      if (protected_accessible_p (decl, t, binfo)
-         || friend_accessible_p (t, decl, binfo))
+      if (protected_accessible_p (decl, t, binfo))
        return 1;
 
   if (TREE_CODE (scope) == FUNCTION_DECL