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


2008/10/26 Mark Mitchell <mark@codesourcery.com>:
> Manuel López-Ibáñez wrote:
>
>> 2008-10-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>       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.

Cheers,

Manuel.

Attachment: pr36254.C.004t.gimple
Description: Binary data


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