aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/kext4.C
blob: bdaefb61121a8b01c6e17a065c90c7b843c54874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* APPLE LOCAL file KEXT double destructor */
/* { dg-do compile } */
/* { dg-options "-fapple-kext" } */
/* test for use of apple_kext_compatibility on stack */
struct B1 {
  virtual ~B1();
} __attribute__((apple_kext_compatibility));

struct D1 : B1 {
  void operator delete(void *) { }
  D1();
};

struct D2 : B1 {
  void operator delete(void *);
  D2();
};

struct D3 : B1 {
  D3();
};

void foo() {
  D1 d1;			// ok
  D2 d2;			// { dg-warning "is an instance of a class" }
  D3 d3;			// { dg-warning "is an instance of a class" }
}