/cp
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / pure1.C
blobe825f0098433d339e7433c259b0114375cfba6df
1 // PR c++/23266
2 // Origin: Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3 // { dg-do compile }
5 void foo0() = 0;                   // { dg-error "like a variable" }
6 virtual void foo1() = 0;           // { dg-error "1:'virtual' outside class" }
7 // { dg-error "like a variable" "" { target *-*-* } 6 }
8 struct A
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" }
16 struct B : A
18   static void foo5() = 0;          // { dg-error "static member|declared" }