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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [parse/] [access4.C] - Blame information for rev 832

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
 
3
// Origin: Mike Reed 
4
 
5
// PR c++/11174: Access checking of pointer-to-member function
6
 
7
class A {
8
protected:
9
  void foo() {}                 // { dg-error "protected" }
10
public:
11
  A();
12
};
13
 
14
class B : public A {
15
  void bar() {
16
    A a;
17
    void (A::*pmf)() = &A::foo;        // { dg-error "this context" }
18
    (a.*pmf)();
19
  }
20
};

powered by: WebSVN 2.1.0

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