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: Divorce of return warnings


On Fri, May 13, 2005 at 09:25:34PM +0200, Jan Hubicka wrote:
> 	* 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.

Ok.

I suppose the common cases are "have a return", "have an abort"
and "have a while (1) loop", none of which are really affected
by optimization.

Since this "pass" doesn't iterate or anything, I don't see the
need to move the warning flag test out to a gate function.


r~


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