S/390: Deprecate g5 and g6 CPU levels
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wunused-parm-1.C
blob08bfaa66bbbb8ae9a121416d8968f61249147980
1 // { dg-do compile }
2 // { dg-options "-Wunused -W" }
4 long
5 f1 (unsigned long long x)
7   unsigned long long a = 1;
8   const union { unsigned long long l; unsigned int p[2]; } b = { x };
9   const union { unsigned long long l; unsigned int p[2]; } c = { a };
10   return b.p[0] + c.p[0];
13 int
14 f2 (int x, int y)
16   int a = 1;
17   int b[] = { 1, 2, x, a, 3, 4 };
18   return b[y];
21 int
22 f3 (int a)      // { dg-warning "unused parameter" }
24   return 0;
27 int
28 f4 (int a)      // { dg-warning "set but not used" }
30   a = 1;
31   return 0;
34 int
35 f5 (int a)
37   a = 1;
38   return a;
41 int
42 f6 (int &a)
44   return a;
47 void
48 f7 (int &a)
50   a = 1;
53 struct S
55   S (int i) : j(i) {}
56   S (long i) : j(i + 1) {}
57   int j;