Commit 9da58884 by Jan Hubicka Committed by Jan Hubicka

c-decl.c (finish_function): Suppress "control reaches end of non-void function" when...


	* c-decl.c (finish_function): Suppress "control reaches end of
	non-void function" when "no return statement in function
	returning non-void" is issued.

From-SVN: r99659
parent 81cfbbc2
2005-05-13 Jan Hubicka <jh@suse.cz>
* c-decl.c (finish_function): Suppress "control reaches end of
non-void function" when "no return statement in function
returning non-void" is issued.
* tree-inline.c (copy_body_r): Simplify substituted ADDR_EXPRs.
* tree-optimize.c (pass_gimple): Kill.
(init_tree_optimization_passes): Kill pass_gimple.
......
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment