aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 2c9ac09..f059ef1 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2838,8 +2838,9 @@ expand_byte_code (JCF *jcf, tree method)
if (dead_code_index != -1)
{
/* We've just reached the end of a region of dead code. */
- warning ("unreachable bytecode from %d to before %d",
- dead_code_index, PC);
+ if (extra_warnings)
+ warning ("unreachable bytecode from %d to before %d",
+ dead_code_index, PC);
dead_code_index = -1;
}
}
@@ -2875,8 +2876,9 @@ expand_byte_code (JCF *jcf, tree method)
if (dead_code_index != -1)
{
/* We've just reached the end of a region of dead code. */
- warning ("unreachable bytecode from %d to the end of the method",
- dead_code_index);
+ if (extra_warnings)
+ warning ("unreachable bytecode from %d to the end of the method",
+ dead_code_index);
}
}