gcc/testsuite/g++.dg/warn/Wunused-parm-9.C
raw| 1 | // PR c++/79746 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Wunused-but-set-parameter" } |
| 4 | |
| 5 | struct A { |
| 6 | A (const char *x) : a(x) {} // { dg-bogus "set but not used" } |
| 7 | virtual int foo () = 0; |
| 8 | const char *a; |
| 9 | }; |
| 10 | struct B : public virtual A { |
| 11 | B (const char *x) : A(x) {} // { dg-bogus "set but not used" } |
| 12 | }; |