Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wunused-parm-4.C

raw
1 // PR c++/47783
2 // { dg-do compile }
3 // { dg-options "-Wunused -W" }
4
5 struct R
6 {
7 int &i;
8 };
9
10 void
11 foo (R r, int &s)
12 {
13 r.i = 7;
14 s = 8;
15 }
16
17 int
18 bar ()
19 {
20 int x = 1, y = 1;
21 R r = { x };
22 foo (r, y);
23 return x + y;
24 }