| 1 |
// PR c++/79782 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "-Wunused-but-set-parameter -Wunused-parameter" } |
| 4 |
|
| 5 |
struct E { virtual E *foo () const = 0; }; |
| 6 |
struct F : virtual public E { }; |
| 7 |
struct G : public virtual F { G (int x) : F () { } }; // { dg-warning "unused parameter" } |
| 8 |
struct H : virtual public E { H (int x, int y); }; |
| 9 |
struct I : public virtual H { I (int x, int y) : H (x, y) { } }; // { dg-bogus "set but not used" } |
| 10 |
struct J : public virtual H { J (int x, int y) : H { x, y } { } }; // { dg-bogus "set but not used" } |
| 11 |
struct K : public virtual H { K (int x, int y) : H (x * 0, y + 1) { } }; // { dg-bogus "set but not used" } |
| 12 |
struct L : public virtual H { L (int x, int y) : H { x & 0, y | 1 } { } }; // { dg-bogus "set but not used" } |