summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/visibility1.C
blob: cb4003f0a234c1b6615e0c374b9ea56ff4bb96d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// GROUPS passed visibility
class foo {
protected:
  int i; // { dg-error "" } protected
};

class bar : public foo {
public:
  friend void baz (foo *);
};

void baz (foo *f)
{
  f->i = 1;	// error: i is protected// { dg-error "" } .*
}