1// PR c++/23266 2// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3// { dg-do compile } 4 5void foo0() = 0; // { dg-error "like a variable" } 6virtual void foo1() = 0; // { dg-error "outside class|variable" } 7 8struct A 9{ 10 void foo2() = 0; // { dg-error "non-virtual" } 11 static void foo3() = 0; // { dg-error "static member" } 12 virtual static void foo4() = 0; // { dg-error "both virtual and static" } 13 virtual void foo5() = 0; // { dg-error "base class" } 14}; 15 16struct B : A 17{ 18 static void foo5() = 0; // { dg-error "static member|declared" } 19}; 20