summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/pure1.C
blob: ddd3cb332dfd85bbf712f65e653666018e219a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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" }
};