diff options
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index d75648a..0d107ad 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -9687,6 +9687,7 @@ finish_function (void) /* Normally, with -Wreturn-type, flow will complain, but we might optimize out static functions. */ && !TREE_PUBLIC (fndecl) + && targetm.warn_func_return (fndecl) && warning (OPT_Wreturn_type, "no return statement in function returning non-void")) TREE_NO_WARNING (fndecl) = 1; |