summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/access3.C
blob: 43303c95a943e7ea491f16a0bbd8ea60d301dcdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }

// Origin: <bagnara@cs.unipr.it>

// PR c++/7809: Befriending inaccessible name.

class A {
private:
  void f();		// { dg-error "private" }
};

class B {
  friend void A::f();	// { dg-error "context" }
};