+2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * decl.c (grokdeclarator): Do type access control on friend
+ class.
+
2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
/* Only try to do this stuff if we didn't already give up. */
if (type != integer_type_node)
{
+ decl_type_access_control (TYPE_NAME (type));
+
/* A friendly class? */
if (current_class_type)
make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type));
else
cp_error ("trying to make class `%T' a friend of global scope",
type);
+
type = void_type_node;
}
}
+2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.other/friend9.C: New test.
+
2000-11-28 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20001127-1.c: New test.
2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
- * g++.old-deja/g++.other/friend46.C: New test.
+ * g++.old-deja/g++.pt/friend46.C: New test.
2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Nov 2000 <nathan@codesourcery.com>
+
+// Bug 853: We reported the wrong line no for a friend access violation
+
+class F
+{
+ class Internal; // ERROR - is private
+};
+
+class C
+{
+ friend class F::Internal; // ERROR - in this context
+ public:
+ typedef enum { A, B } e;
+
+ C ();
+ ~C();
+
+ void m();
+};