summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/warn6.C
blob: 9c694d62559857014a2e6504b1f2bbe21d351b1f (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
38
39
40
41
42
// { dg-do assemble  }
// { dg-options "-Woverloaded-virtual" }

struct B4 {
  virtual void bothfardiff(float);	// { dg-warning "" } was hidden
};

struct B3 : public B4 {
};

struct B2 {
};

struct B {
  virtual void baseonly(int);

  virtual void bothsame(int);

  virtual void bothdiff(float);		// { dg-warning "" } was hidden

  virtual void both2same(int);
  virtual void both2same(float);

  virtual void both12diff(int);
  virtual void both12diff(float);	// { dg-warning "" } was hidden
};

struct D : public B, public B2, public B3 {
  virtual void derivedonly(int);

  virtual void bothsame(int);

  virtual void bothdiff(int);		// { dg-warning "" } 

  virtual void both2same(int);
  virtual void both2same(float);

  virtual void both12diff(int);		// { dg-warning "" } 

  virtual void bothfardiff(int);	// { dg-warning "" } 
};