OSDN Git Service

* expr.c (expand_byte_code): Only warn about dead bytecode when
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Oct 2003 15:44:52 +0000 (15:44 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Oct 2003 15:44:52 +0000 (15:44 +0000)
extra_warnings is set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72805 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/expr.c

index 35dce1c..4914b98 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-22  Tom Tromey  <tromey@redhat.com>
+
+       * expr.c (expand_byte_code): Only warn about dead bytecode when
+       extra_warnings is set.
+
 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
 
        Fix for PR java/12586.
index 2c9ac09..f059ef1 100644 (file)
@@ -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);
     }
 }