aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/warning4.C
blob: 9f50ff2c24279a9e446acae08aba304f5b18b010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// { dg-options "-Woverloaded-virtual" }
// Bug: a virtual function with the same name in an unrelated class will
// cause a bogus overloading warning.

struct A {
  virtual void foo ();
};

struct B {
  virtual void bar ();
};

struct C: public A {
  virtual void bar  ();
};