]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
expr.c (expand_byte_code): Only warn about dead bytecode when extra_warnings is set.
authorTom Tromey <tromey@redhat.com>
Wed, 22 Oct 2003 15:44:52 +0000 (15:44 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 22 Oct 2003 15:44:52 +0000 (15:44 +0000)
* expr.c (expand_byte_code): Only warn about dead bytecode when
extra_warnings is set.

From-SVN: r72805

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

index 35dce1c3b8b6ab80bc4ffa7625c5d376142a7f0d..4914b9877565f1e32740960c196c09923b180d0c 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 2c9ac09e7358bd55e9302cb4df95948af2a0496a..f059ef12a7dd1ec26a6f789e69ae3630b1a88557 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);
     }
 }