view gcc/testsuite/g++.dg/conversion/cast1.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/10841

int main() {
  class Base { 
  public: 
    int i, j, k; 
    void f(); };

  class Derived : private Base { 
  public: 
    int m, n, p; 
    void g(); 
  };

  Derived derived;
  Base &base = (Base &)derived;
  (int Base::*)&Derived::n;
  (int Derived::*)&Base::j;
  (void (Base::*)(void))&Derived::g;
  (void (Derived::*)(void))&Base::f;
}