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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [parse/] [access4.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do compile }
// { dg-do compile }
// Origin: Mike Reed 
// Origin: Mike Reed 
// PR c++/11174: Access checking of pointer-to-member function
// PR c++/11174: Access checking of pointer-to-member function
class A {
class A {
protected:
protected:
  void foo() {}                 // { dg-error "protected" }
  void foo() {}                 // { dg-error "protected" }
public:
public:
  A();
  A();
};
};
class B : public A {
class B : public A {
  void bar() {
  void bar() {
    A a;
    A a;
    void (A::*pmf)() = &A::foo;        // { dg-error "this context" }
    void (A::*pmf)() = &A::foo;        // { dg-error "this context" }
    (a.*pmf)();
    (a.*pmf)();
  }
  }
};
};
 
 

powered by: WebSVN 2.1.0

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