Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wunused-var-13.C

raw
1 // PR c++/44619
2 // { dg-do compile }
3 // { dg-options "-Wunused -W" }
4
5 struct S { int x, y; };
6
7 int
8 f1 ()
9 {
10 struct S p;
11 int S::*q = &S::x;
12 p.*q = 5;
13 return p.*q;
14 }
15
16 int
17 f2 (struct S *p, int S::*q)
18 {
19 struct S *r = p;
20 int S::*s = q;
21 return r->*s;
22 }