aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorEric Fisher <joefoxreal@gmail.com>2010-01-05 12:30:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-01-05 12:30:30 +0000
commitbc3c12a29c67753c473b465767b2ba6b2f7e72a6 (patch)
tree589de603d5bb2de5f913adb4dcd7e403d6b4dc07 /gcc/tree-cfg.c
parent4ebf9c376342d1cb69f1aefddc2db5d2fe950248 (diff)
downloadgcc-bc3c12a29c67753c473b465767b2ba6b2f7e72a6.zip
gcc-bc3c12a29c67753c473b465767b2ba6b2f7e72a6.tar.gz
gcc-bc3c12a29c67753c473b465767b2ba6b2f7e72a6.tar.bz2
invoke.texi: Remove the documentation about option -Wunreachable-code.
2010-01-05 Eric Fisher <joefoxreal@gmail.com> * doc/invoke.texi: Remove the documentation about option -Wunreachable-code. * common.opt (Wunreachable-code): Preserved for backward compatibility. * tree-cfg.c: Remove the implementation of -Wunreachable-code. * opts.c (common_handle_option): Add OPT_Wunreachable_code to the backward compatibility flag section. * gcc.dg/pr12603.c: Remove -Wunreachable-code from dg-options. * gcc.dg/Wunreachable-1.c: Remove the testcase of -Wunreachable-code. * gcc.dg/Wunreachable-2.c: Likewise. * gcc.dg/Wunreachable-3.c: Likewise. * gcc.dg/Wunreachable-4.c: Likewise. * gcc.dg/Wunreachable-5.c: Likewise. * gcc.dg/Wunreachable-6.c: Likewise. * gcc.dg/Wunreachable-7.c: Likewise. * gcc.dg/Wunreachable-8.c: Likewise. * gcc.dg/20041231-1.c: Likewise. From-SVN: r155645
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 3a08689..2eb3cd2 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1760,7 +1760,6 @@ static void
remove_bb (basic_block bb)
{
gimple_stmt_iterator i;
- source_location loc = UNKNOWN_LOCATION;
if (dump_file)
{
@@ -1830,24 +1829,9 @@ remove_bb (basic_block bb)
i = gsi_last_bb (bb);
else
gsi_prev (&i);
-
- /* Don't warn for removed gotos. Gotos are often removed due to
- jump threading, thus resulting in bogus warnings. Not great,
- since this way we lose warnings for gotos in the original
- program that are indeed unreachable. */
- if (gimple_code (stmt) != GIMPLE_GOTO
- && gimple_has_location (stmt))
- loc = gimple_location (stmt);
}
}
- /* If requested, give a warning that the first statement in the
- block is unreachable. We walk statements backwards in the
- loop above, so the last statement we process is the first statement
- in the block. */
- if (loc > BUILTINS_LOCATION && LOCATION_LINE (loc) > 0)
- warning_at (loc, OPT_Wunreachable_code, "will never be executed");
-
remove_phi_nodes_and_edges_for_unreachable_block (bb);
bb->il.gimple = NULL;
}