Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wunused-var-13.C
blob: 43df81d888c0b8d47689eb87a7fd4c2416bc2141 [
file
] [
log
] [
blame
]
// PR c++/44619
// { dg-do compile }
// { dg-options "-Wunused -W" }
struct
S
{
int
x
,
y
;
};
int
f1
()
{
struct
S p
;
int
S
::*
q
=
&
S
::
x
;
p
.*
q
=
5
;
return
p
.*
q
;
}
int
f2
(
struct
S
*
p
,
int
S
::*
q
)
{
struct
S
*
r
=
p
;
int
S
::*
s
=
q
;
return
r
->*
s
;
}