1 2 3 4 5 6 7 8
// { dg-do assemble } class A {}; class C {}; int main() { A* a = 0; C* c = static_cast<C*>(a); // { dg-error "" } bad static cast }