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