Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / warn7.C
blobc7684d18ca1da7045ad1e1681ea417f430077380
1 // { dg-do assemble  }
2 // { dg-options "-W -Wall" }
3 // 
4 // Copyright (C) 2001 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 26 April 2001 <nathan@codesourcery.com>
7 // Bug 2356. Unused parameter information introduced in a ctor
8 // definition was not propagated to clones, leading to missed or
9 // unwarranted unused parameter warnings, possibly given twice.
11 struct X
13   X(int i);
14   void foo (int i);
15   
17 void foo (int i);
19 X::X(int)
22 void X::foo (int) 
25 void foo (int)
29 struct Y
31   Y(int);
32   void bar (int);
33   
35 void bar (int);
37 Y::Y(int i)  // { dg-warning "unused parameter" }
40 void Y::bar (int i)  // { dg-warning "unused parameter" }
43 void bar (int i) // { dg-warning "unused parameter" }