summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Woverloaded-1.C
blob: 65a408b47d0e190358618c6aed2825681d8f01fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-options "-Woverloaded-virtual" } */

class Base {
public:
  virtual ~Base() {
  }
};

class Derived: public Base {
public:
  int Base() { // There should be no error here.
    return 5;
  }
};

int main() {
}