gcc/testsuite/g++.old-deja/g++.law/access3.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed access |
| 3 | // unsorted.2 file |
| 4 | // Date: Sat, 6 Jun 1992 18:23:03 -0400 |
| 5 | // From: Brendan Kehoe <[email protected]> |
| 6 | // Message-Id: <[email protected]> |
| 7 | // Subject: bug with access control to member functions |
| 8 | |
| 9 | class X { |
| 10 | void g (int); // { dg-message "" } is private |
| 11 | public: |
| 12 | void g (double); |
| 13 | }; |
| 14 | |
| 15 | class Y : public X { void f() { g (1); } };// { dg-error "" } |
| 16 |