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 Thu, Oct 23, 2008 at 2:57 AM, Manuel López-Ibáñez
<> wrote:
> Now with patch.
> 2008/10/23 Manuel López-Ibáñez <>:
>> 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  <>
>>        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.

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