Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.law/visibility10.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do assemble } |
2 // GROUPS passed visibility | |
3 | |
4 #include <iostream> | |
5 | |
6 class base { | |
7 public: | |
8 void f1 () { std::cout << "f1" << std::endl; } | |
9 void f2 () { std::cout << "f2" << std::endl; } | |
10 }; | |
11 | |
12 class deriv : public base { | |
145 | 13 void base :: f1();// { dg-error "8:cannot declare" } .* |
111 | 14 }; |
15 | |
16 int main () | |
17 { | |
18 deriv d; | |
19 | |
20 d.f2(); | |
21 } | |
22 |