[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200:
From: |
kevwalsh at gmail dot com |
Subject: |
[Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement |
Date: |
22 Jan 2007 17:01:13 -0000 |
------- Comment #3 from kevwalsh at gmail dot com 2007-01-22 17:01 -------
(In reply to comment #1)
> Technically speaking this is a gcj bug.
> In this case it does not properly implement reachability.
In what sense is the "i++" code "reachable"? As already mentioned, there is no
possible path to that statement: the for-loop always terminates in the first
iteration, via a break or a throw.
This is a great example of the common idea that warnings are for newbies, and
that real programers can ignore them (or blame them on the stupid compiler).
This code is broken: someone forgot the "else" just before the throw.
*** gnu/java/security/util/Base64.java 2007-01-22 11:55:34.000000000 -0500
--- gnu/java/security/util/Base64.java 2007-01-22 11:55:52.000000000 -0500
*************** public class Base64
*** 216,221 ****
--- 216,222 ----
} // end if: quartet built
} // end if: equals sign or better
}
+ else
throw new IllegalArgumentException("Illegal BASE-64 character at #"
+ i + ": " + src[i] +
"(decimal)");
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29370
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement,
kevwalsh at gmail dot com <=
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, tromey at gcc dot gnu dot org, 2007/01/22
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, bug at naffah-raif dot name, 2007/01/23
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, csm at gnu dot org, 2007/01/23
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, bug at naffah-raif dot name, 2007/01/24
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, rsdio at metastatic dot org, 2007/01/24
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, bug at naffah-raif dot name, 2007/01/25
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, bug at naffah-raif dot name, 2007/01/25
- [Bug classpath/29370] classpath/gnu/java/security/util/Base64.java:200: warning: Unreachable statement, csm at gnu dot org, 2007/01/31