Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wno-return-local-addr.C
blob: e15bfa24f54baa14abf6e799ea9888663f3a25bf [
file
] [
log
] [
blame
]
// { dg-do assemble }
// { dg-options "-Wno-return-local-addr" }
int
&
bad1
()
{
int
x
=
0
;
return
x
;
}
int
*
bad2
()
{
int
x
=
0
;
return
&
x
;
}
int
f
();
const
int
&
bad3
()
{
return
f
();
}
const
int
&
bad4
()
{
return
int
();
}