This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid control reaches end warning when the frontend already issued warning about returning no value (PR c/23075)


On Mon, Sep 05, 2005 at 05:56:33AM -0400, Jakub Jelinek wrote:
> 	* c-typeck.c (c_finish_return): Set TREE_NO_WARNING on RETURN_EXPR
> 	if "return with no value, in function returning non-void" warning
> 	has been issued.
>   	* tree-cfg.c (execute_warn_function_return): Don't look at
> 	RETURN_EXPRs with TREE_NO_WARNING set.
> 	* typeck.c (check_return_expr): Add no_warning argument.  Set
> 	*no_warning to true if "return-statement with no value, in function
> 	returning" warning has been issued.
> 	* cp-tree.h (check_return_expr): Adjust prototype.
> 	* semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
> 	check_return_expr set *no_warning to true.
> 	* gcc.dg/pr23075.c: New test.
> 	* g++.dg/warn/pr23075.C: New test.

Ok.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]