view gcc/testsuite/g++.dg/warn/Wunused-parm-10.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +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" }