OSDN Git Service

* lib/libjava.exp (libjava_prune_warnings): Remove all unreachable
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Jan 2003 18:09:04 +0000 (18:09 +0000)
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Jan 2003 18:09:04 +0000 (18:09 +0000)
       bytecode warnings.

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

libjava/testsuite/ChangeLog
libjava/testsuite/lib/libjava.exp

index 23293ea..c1edda6 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-31  Mark Wielaard  <mark@klomp.org>
+
+       * lib/libjava.exp (libjava_prune_warnings): Remove all unreachable
+       bytecode warnings.
+
 2003-01-28  Tom Tromey  <tromey@redhat.com>
 
        * libjava.loader/TestEarlyGC.java: Added comment explaining
index 9c8e664..05cf08f 100644 (file)
@@ -18,9 +18,15 @@ proc libjava_prune_warnings {text} {
     set len [llength $tlist]
     for {set i [expr {$len - 1}]} {$i >= 2} {incr i -1} {
        if {[string match "*unreachable bytecode*" [lindex $tlist $i]]} {
-           # Delete this line and the previous two lines.
-           set tlist [lreplace $tlist [expr {$i - 2}] $i]
-           incr i -2
+           # Delete this line, all other unreachable warnings and the previous
+           # two lines containing the method and class.
+           set j [expr {$i - 1}]
+           while {[string match "*unreachable bytecode*" [lindex $tlist $j]]} {
+               incr j -1
+           }
+           incr j -1
+           set tlist [lreplace $tlist $j $i]
+           set i $j
        }
     }
     return [join $tlist \n]