Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.martin/ambig1.C

raw
1 // { dg-do assemble }
2 //Based on a report by Bill Currie <[email protected]>
3 struct foo {
4 protected:
5 int x; // { dg-message "" } candidate
6 };
7
8 struct bar {
9 public:
10 int x(); // { dg-message "" } candidate
11 };
12
13 struct foobar: public foo, public bar {
14 foobar();
15 };
16
17 int func(int);
18
19 foobar::foobar()
20 {
21 func(x); // { dg-error "" } ambiguous member access
22 }