1struct B {}; 2struct D : public B {}; 3 4typedef int B::*bm; 5typedef int D::*dm; 6 7bm bp; 8 9void f() { 10 const_cast<dm>(bp); // { dg-error "" } 11} 12