This is the mail archive of the 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: Divorce of return warnings

On Fri, May 13, 2005 at 09:25:34PM +0200, Jan Hubicka wrote:
> Hi,
> with CFG inlining we want to warn about control reaching without return
> statement before inlining so we don't ahve to duplicate the logic in
> inliner.  This however breaks some of testcases checking warning about
> missing noreturn flag as we don't discover tail recursion.
> It seem to make sense to make those warnings happen at different stages
> of compilation (in general I don't like warnings depend on optimization)
> Bootstrapped/regtested i686-pc-gnu-linux as a part of the CFG inliner
> aptch, separate testing in progress, OK if it passes?
> Honza
> 2005-05-13  Jan Hubicka  <>
> 	* tree-cfg.c (execute_warn_function_return): Break out noreturn
> 	warning too..
> 	(execute_warn_function_noreturn): ... here.
> 	(pass_warn_function_noreturn): New pass.
> 	* tree-pass.h (pass_warn_function_noreturn): Declare
> 	* tree-optimize.c (init_tree_optimization_passes): Move return
> 	warnings early and add noreturn warnings at place of previous
> 	return warnings.

This adds a pass which does nothing if the warning isn't enabled; can
you split that out to the gate?

Daniel Jacobowitz
CodeSourcery, LLC

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