re PR c++/70808 (Spurious -Wzero-as-null-pointer-constant for nullptr_t)
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wunused-var-13.C
blob43df81d888c0b8d47689eb87a7fd4c2416bc2141
1 // PR c++/44619
2 // { dg-do compile }
3 // { dg-options "-Wunused -W" }
5 struct S { int x, y; };
7 int
8 f1 ()
10   struct S p;
11   int S::*q = &S::x;
12   p.*q = 5;
13   return p.*q;
16 int
17 f2 (struct S *p, int S::*q)
19   struct S *r = p;
20   int S::*s = q;
21   return r->*s;