aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C
blob: 1417c4ab891b529519e96924de262002af3210d7 (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
28
29
30
31
32
33
34
35
36
37
// Build don't link: 
typedef __SIZE_TYPE__ size_t;

class   A {

public:
  void          operator delete(void*, size_t);
  void*         operator new(size_t);
};

class   B   : public A  {
friend class   D;

  B();
  unsigned      counter;
};

class   D {

  int                   ins( B*&);
};                    //WARNING - only private members

int
D::ins( B*& tempN)
{
  unsigned i;

  if (i == 10) {
  }
  else {
  }

  tempN = new B();
  tempN->counter = 20;

  return 0;
}