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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr52.C] - Blame information for rev 716

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// Origin: Giovanni Bajo 
3
// DR52: Non-static members, member selection and access checking
4
 
5
struct A
6
{
7
  void foo(void);
8
};
9
 
10
struct B
11
{
12
private:
13
  void foo(void);
14
};
15
 
16
struct B1 : B {};
17
struct B2 : B {};
18
 
19
struct C
20
{ // { dg-error "C" }
21
  void foo(void);
22
};
23
 
24
struct D : private C {};
25
 
26
struct X: A, B1, B2, D
27
{
28
public:
29
  void bar(void)
30
  {
31
    this->B::foo();  // { dg-error "" }
32
    this->C::foo();  // { dg-error "inaccessible|context" }
33
  }
34
};

powered by: WebSVN 2.1.0

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