This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/24835] New: gcj accepts invalid code with static final variables
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 13 Nov 2005 16:16:11 -0000
- Subject: [Bug java/24835] New: gcj accepts invalid code with static final variables
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code is invalid:
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
class a
{
private static final MessageDigest md5Digest;
static
{
try
{
md5Digest = MessageDigest.getInstance("MD5");
}
catch (NoSuchAlgorithmException _)
{
md5Digest = null;
}
}
}
-------
But is accepted.
--
Summary: gcj accepts invalid code with static final variables
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24835