This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Divorce of return warnings
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Fri, 13 May 2005 15:27:14 -0400
- Subject: Re: Divorce of return warnings
- References: <20050513192534.GF9157@kam.mff.cuni.cz>
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 <jh@suse.cz>
> * 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