PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / Wunused-parm-1.c
blobbddbd83a63c635c9ddb6ad7a3d631d3ed6ccacd9
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 = { .l = x };
9 const union { unsigned long long l; unsigned int p[2]; } c = { .l = 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" } */
23 int b, /* { dg-warning "set but not used" } */
24 int c)
26 b = 1;
27 c = 1;
28 return c;