repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
parse
/
access6.C
blob
33d5090585491132cd922fc774017460c1000f9b
1
// { dg-do compile }
2
3
// Origin: David Baron <dbaron@fas.harvard.edu>
4
5
// PR c++/3765: Changing access from public to private by member
6
// using declaration.
7
8
class A
9
{
10
public:
11
int foo() { return 1; } // { dg-error "inaccessible" }
12
};
13
14
class B : public A
15
{
16
private:
17
using A::foo;
18
};
19
20
int main()
21
{
22
B b;
23
return b.foo(); // { dg-error "this context" }
24
}