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: PR c++/36254 wrong "control reaches end of non-void function" warning

On Mon, Oct 27, 2008 at 11:11:17AM +0100, Manuel López-Ibáñez wrote:
> 2008/10/26 Mark Mitchell <>:
> > Manuel López-Ibáñez wrote:
> >
> >> 2008-10-23  Manuel López-Ibáñez  <>
> >>
> >>       PR c++/36254
> >>       * gimplify.c (gimplify_expr): Propagate the no_warning flag.
> >>       * gimple-low.c (lower_function_body): Propagate the no_warning
> >>       flag.
> >
> > What does the comipler-generated code for this testcase look like, and
> > why is it confusing the warning machinery?
> See the gimple dump attached. Basically, we surround the whole
> function in try/finally. Then, because flow falls to the end of the
> function, we add a return.
> I can attach other dumps if you want, but I think the problem is already here.

The problem is different and you really don't want to play with nowarning
flag.  gimple_seq_may_fallthru handles try/finally and try/catch correctly.
The problem is the unnecessary GIMPLE_GOTO after GIMPLE_RETURN which makes
gimple_seq_may_fallthru believe this can fallthru, even if it can't.
I'll have a look.


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