Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
return-reference2.C
blob: e9004f77a76f996c06dd9dbda28732b3af6c7eee [
file
] [
log
] [
blame
]
// PR c++/26671
class
A
{
public
:
int
first
;
int
second
;
};
int
&
f
()
{
A a
;
return
a
.
second
;
// { dg-warning "local" }
}
int
&
g
()
{
int
ar
[
42
];
return
ar
[
20
];
// { dg-warning "local" }
}