blob: ddd3cb332dfd85bbf712f65e653666018e219a6c [file] [log] [blame]
// PR c++/23266
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
void foo0() = 0; // { dg-error "like a variable" }
virtual void foo1() = 0; // { dg-error "outside class|variable" }
struct A
{
void foo2() = 0; // { dg-error "non-virtual" }
static void foo3() = 0; // { dg-error "static member" }
virtual static void foo4() = 0; // { dg-error "both virtual and static" }
virtual void foo5() = 0; // { dg-error "base class" }
};
struct B : A
{
static void foo5() = 0; // { dg-error "static member|declared" }
};