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] Fix bogus 'function does return' warning


> If you want to prevent EH from adding unnecessary edges, you also need
> to remove gotos; removing just the returns is not sufficient.

That seems sufficient to fix the regressions related to the warning though.
Richard G. suggested in an earlier message to handle only returns.

> > +	if (gimple_try_kind (stmt) == GIMPLE_TRY_FINALLY)
> > +	  data->cannot_fallthru |= try_cannot_fallthru;
> > +	else
> > +	  data->cannot_fallthru = false;
>
> This last line is not correct.  It should read
>
>    data->cannot_fallthru = try_cannot_fallthru;

Setting cannot_fallthru to false cannot be not correct, see the head comment.  
Are you positive that this will work if one of the GIMPLE_CATCHes falls thru?

-- 
Eric Botcazou


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