aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wunused-parm-5.c
blob: 1c80a8240864db2624f326b0861dd16c2757628c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* PR c/44677 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wunused-but-set-parameter=1" } */

void baz (int);

void
foo (int a,		/* { dg-warning "parameter 'a' set but not used" } */
     int b,
     int c,
     int d,
     int e,
     int f,
     int g,
     int h,
     int i,
     int j,
     int k,
     int l,
     int m)
{
  a = 1;
  ++b;
  c++;
  --d;
  e--;
  f += 2;
  g |= 2;
  h -= 2;
  i &= 2;
  j ^= 2;
  k *= 2;
  l %= 2;
  for (int n = 4; n < 10; n++, m++)
    baz (n);
}

int
bar (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
     int k, int l, int m, int n)
{
  b = ++a;
  d = --c;
  f = e--;
  h = g++;
  j = i += 42;
  l = k *= 4;
  n = m |= 2;
  return b + d + f + h + j + l + n;
}