gcc/testsuite/g++.dg/warn/Woverloaded-virt10.C
raw| 1 | // PR c++/117114 - Test case from PR c++/117114 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-additional-options -Woverloaded-virtual } |
| 4 | |
| 5 | struct Troops { virtual ~Troops(); }; |
| 6 | struct Control { virtual int GetControl() const = 0; }; |
| 7 | struct Army : Troops, Control { int GetControl() const override; }; |
| 8 | |
| 9 | struct VirtualControl : virtual Control { |
| 10 | int GetControl() const override; |
| 11 | }; |