repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr81212.C
blob
ce92a07dceb3857aec141fd46d918e2ce1f9a8ec
1
// PR c++/81212
2
// { dg-do compile }
3
// { dg-options "-Wreturn-type -fsanitize=return" }
4
5
struct S
6
{
7
S (void *);
8
void *s;
9
};
10
11
S
12
foo (bool x, void *y)
13
{
14
if (x)
15
return S (y);
16
} // { dg-warning "control reaches end of non-void function" }