Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
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" }
}