aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/decl3.C
blob: 6068e3105dccd87e903ca80f7bde1e3b0fd6bb48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Build don't link:

// Origin:  Adapted by Nathan Sidwell 29 Apr 1999 <nathan@acm.org>
//          from a test case submitted by Corey Kosak <kosak@cs.cmu.edu>
//          http://egcs.cygnus.com/ml/egcs-bugs/1999-04/msg00502.html

// We should not allow arrays of abstract type. [class.abstract/2]

struct cow_t {
  virtual void f()=0; // ERROR - abstract
};


int main()
{
  cow_t cow[2];  // ERROR - abstract class
  cow[0].f();
  return 0;
}