OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [access6.C] - Blame information for rev 717

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
// Origin: David Baron 
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.