Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr81212.C
blob: ce92a07dceb3857aec141fd46d918e2ce1f9a8ec [
file
] [
log
] [
blame
]
// PR c++/81212
// { dg-do compile }
// { dg-options "-Wreturn-type -fsanitize=return" }
struct
S
{
S
(
void
*);
void
*
s
;
};
S
foo
(
bool
x
,
void
*
y
)
{
if
(
x
)
return
S
(
y
);
}
// { dg-warning "control reaches end of non-void function" }