diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-07 22:18:35 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-07 22:18:35 +0000 |
commit | e627cda1433a6aa4f632ec896cea9568a6ce734a (patch) | |
tree | bc411ee056cbc9d17c3e9d69c14e65d3779c178c /gcc/tree-cfg.c | |
parent | a057749e4cfe8ec0b32994b2a543bb6747878449 (diff) | |
download | gcc-e627cda1433a6aa4f632ec896cea9568a6ce734a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index f18bb978487..dd38134802b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1638,6 +1638,8 @@ remove_useless_stmts_warn_notreached (gimple_seq stmts) { gimple stmt = gsi_stmt (gsi); + if (gimple_no_warning_p (stmt)) return false; + if (gimple_has_location (stmt)) { location_t loc = gimple_location (stmt); |