diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-13 14:00:55 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-13 14:00:55 +0000 |
commit | 6a13f0130899a8336955e34f9d8d36f3c99b6e35 (patch) | |
tree | 9ada393a1c3728eecc09d94cd9e363a5a168845c /gcc/c-decl.c | |
parent | eb0fefdb9683c4842532535b6051be0d762223d1 (diff) | |
download | gcc-6a13f0130899a8336955e34f9d8d36f3c99b6e35.tar.gz |
* c-decl.c (finish_function): Suppress "control reaches end of
non-void function" when "no return statement in function
returning non-void" is issued.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99659 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6c9ab457510..e189d3629dd 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6490,7 +6490,10 @@ finish_function (void) /* Normally, with -Wreturn-type, flow will complain. Unless we're an inline function, as we might never be compiled separately. */ && DECL_INLINE (fndecl)) - warning (0, "no return statement in function returning non-void"); + { + warning (0, "no return statement in function returning non-void"); + TREE_NO_WARNING (fndecl) = 1; + } /* With just -Wextra, complain only if function returns both with and without a value. */ |