diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-07-07 22:18:35 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-07-07 22:18:35 +0000 |
commit | d665b6e585efbb1d90b33f330a2cd967430c95a1 (patch) | |
tree | bc411ee056cbc9d17c3e9d69c14e65d3779c178c /gcc/gimplify.c | |
parent | 438c0fa8a04a3f11df33890b3d183f64fa181b55 (diff) | |
download | gcc-d665b6e585efbb1d90b33f330a2cd967430c95a1.zip gcc-d665b6e585efbb1d90b33f330a2cd967430c95a1.tar.gz gcc-d665b6e585efbb1d90b33f330a2cd967430c95a1.tar.bz2 |
re PR c++/31246 (-Wunreachable-code warnings for compiler-generated code)
2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/31246
* gimplify.c (gimplify_expr): Propagate no_warning flag when
gimplifying.
* gimple (gimple_build_call_from_tree): Likewise.
* tree-cfg.c (remove_useless_stmts_warn_notreached): Check
no_warning flag before warning.
cp/
* init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
code.
* cp-gimplify.c (genericize_eh_spec_block): Likewise.
testsuite/
* g++.dg/warn/pr31246.C: New.
* g++.dg/warn/pr31246-2.C: New.
From-SVN: r149354
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 032228d..b20c8ac 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6787,6 +6787,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, gimplify_and_add (EH_FILTER_FAILURE (*expr_p), &failure); ehf = gimple_build_eh_filter (EH_FILTER_TYPES (*expr_p), failure); + gimple_set_no_warning (ehf, TREE_NO_WARNING (*expr_p)); gimple_eh_filter_set_must_not_throw (ehf, EH_FILTER_MUST_NOT_THROW (*expr_p)); gimplify_seq_add_stmt (pre_p, ehf); |