This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR c++/36254 wrong "control reaches end of non-void function" warning
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Gcc Patch List" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Oct 2008 02:56:21 +0200
- Subject: PR c++/36254 wrong "control reaches end of non-void function" warning
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?
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.