-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
mantis
-
generic
-
solaris_8
The following bug in reachability analysis was exposed by the j2se build.
==========> cat -n T.java
1 class T {
2 int f(int a) {
3 for (int ix = 0; ; ix++) {
4 if (ix == a)
5 break;
6 try {
7 return 10;
8 } catch (Error ex) {
9 }
10 }
11 return a;
12 }
13 }
==========> newjavac T.java
/usr/java1.4/bin/javac -J-Xbootclasspath/p:/net/frog/gafter/gjc-work/generics/build/bootstrap2 -J-Xfuture -J-ea:com.sun.tools... -J-Xint -bootclasspath /net/frog/gafter/gjc-work/generics/build/collections2:/usr/java1.4/jre/lib/stubs.jar:/usr/java1.4/jre/lib/rt.jar -classpath . T.java
T.java:11: unreachable statement
return a;
^
1 error
==========>
###@###.### 2002-10-06
==========> cat -n T.java
1 class T {
2 int f(int a) {
3 for (int ix = 0; ; ix++) {
4 if (ix == a)
5 break;
6 try {
7 return 10;
8 } catch (Error ex) {
9 }
10 }
11 return a;
12 }
13 }
==========> newjavac T.java
/usr/java1.4/bin/javac -J-Xbootclasspath/p:/net/frog/gafter/gjc-work/generics/build/bootstrap2 -J-Xfuture -J-ea:com.sun.tools... -J-Xint -bootclasspath /net/frog/gafter/gjc-work/generics/build/collections2:/usr/java1.4/jre/lib/stubs.jar:/usr/java1.4/jre/lib/rt.jar -classpath . T.java
T.java:11: unreachable statement
return a;
^
1 error
==========>
###@###.### 2002-10-06