1// { dg-do compile } 2// { dg-options "-Wunused-parameter" } 3 4// Copyright (C) 2003 Free Software Foundation, Inc. 5// Contributed by Nathan Sidwell 15 Sep 2003 <nathan@codesourcery.com> 6// Origin: yotamm@mellanox.co.il 7 8 9// PR c++/9848. Missing warning 10 11struct C1 { 12 // Only use in-charge ctor 13 C1(int bi) {} // { dg-warning "unused parameter" "" } 14}; 15struct C2 { 16 // Only use base ctor 17 C2(int bi) {} // { dg-warning "unused parameter" "" } 18}; 19 20struct D : C2 21{ 22 D (int) : C2 (1) {} 23}; 24 25void show_compile_warning () 26{ 27 C1 c1 (1); 28 29 D d (1); 30} 31