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

Richard Guenther richard.guenther@gmail.com
Thu Oct 23 13:06:00 GMT 2008


On Thu, Oct 23, 2008 at 2:57 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> Now with patch.
>
> 2008/10/23 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> This is similar case as my patch for PR 31246: more cases of
>> compiler-generated code. In fact, there is some overlap between them.
>>
>> Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
>> --enable-languages=all,obj-c++ --enable-decimal-float.
>>
>> OK for trunk?

Wherever you just set TREE_NO_WARNING or gimple_set_no_warning
(and not propagate it) during gimplification looks fishy.

It looks like for both patches it might work to just disable these warnings for
EH related code?  (The propagation of the no-warning flag during gimplification
_does_ look correct, though)

Thanks,
Richard.

>> 2008-10-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>        PR c++/36254
>>        * gimplify.c (gimplify_bind_expr): Set NO_WARNING for compiler-generated
>>        code.
>>        (gimplify_cleanup_point_expr): Likewise.
>>        (gimplify_expr): Propagate the no_warning flag.
>>        * gimple-low.c (lower_function_body): Propagate the no_warning
>>        flag.
>> testsuite/
>>        * g++dg/eh/pr36254.C: New.
>> cp/
>>        * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
>>        code.
>>        * except.c (build_throw): Likewise.
>>        * cp-gimplify.c (cp_genericize_r): Likewise.
>>
>



More information about the Gcc-patches mailing list