PR c++/36254 wrong "control reaches end of non-void function" warning

Manuel López-Ibáñez lopezibanez@gmail.com
Mon Oct 27 12:23:00 GMT 2008


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr36254.C.004t.gimple
Type: application/octet-stream
Size: 1505 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081027/c62b4a30/attachment.obj>


More information about the Gcc-patches mailing list