Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/Wunused-parm-10.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/79782 // { dg-do compile { target c++11 } } // { dg-options "-Wunused-but-set-parameter -Wunused-parameter" } struct E { virtual E *foo () const = 0; }; struct F : virtual public E { }; struct G : public virtual F { G (int x) : F () { } }; // { dg-warning "unused parameter" } struct H : virtual public E { H (int x, int y); }; struct I : public virtual H { I (int x, int y) : H (x, y) { } }; // { dg-bogus "set but not used" } struct J : public virtual H { J (int x, int y) : H { x, y } { } }; // { dg-bogus "set but not used" } struct K : public virtual H { K (int x, int y) : H (x * 0, y + 1) { } }; // { dg-bogus "set but not used" } struct L : public virtual H { L (int x, int y) : H { x & 0, y | 1 } { } }; // { dg-bogus "set but not used" }