This is the mail archive of the
mailing list for the GCC project.
Re: PR c++/36254 wrong "control reaches end of non-void function" warning
On Thu, Oct 23, 2008 at 2:57 AM, Manuel López-Ibáñez
> Now with patch.
> 2008/10/23 Manuel López-Ibáñez <firstname.lastname@example.org>:
>> 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)
>> 2008-10-23 Manuel López-Ibáñez <email@example.com>
>> PR c++/36254
>> * gimplify.c (gimplify_bind_expr): Set NO_WARNING for compiler-generated
>> (gimplify_cleanup_point_expr): Likewise.
>> (gimplify_expr): Propagate the no_warning flag.
>> * gimple-low.c (lower_function_body): Propagate the no_warning
>> * g++dg/eh/pr36254.C: New.
>> * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
>> * except.c (build_throw): Likewise.
>> * cp-gimplify.c (cp_genericize_r): Likewise.