Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
nodiscard5.C
blob: fa9a974355bbd8ff080b675d0d19bf6ce3abd23d [
file
] [
log
] [
blame
]
// PR c++/80896
// { dg-do compile { target c++11 } }
int
x
=
42
;
[[
nodiscard
]]
int
&
func
()
{
return
x
;
}
int
main
()
{
func
();
}
// { dg-warning "ignoring return value" }