From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31378 invoked by alias); 2 May 2006 19:31:49 -0000 Received: (qmail 31351 invoked by uid 48); 2 May 2006 19:31:48 -0000 Date: Tue, 02 May 2006 19:31:00 -0000 Subject: [Bug java/27399] New: GCJ permits indexing by final object X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "cagney at redhat dot com" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00196.txt.bz2 List-Id: This compiles: public class ClassIndex implements Comparable { static final ClassIndex x = new ClassIndex (); public int compareTo (Object o) { return 0; } public static void main (String[] args) { System.out.println (ClassIndex.x); byte[] b = new byte[ClassIndex.x]; System.out.println ("Array length: " + b.length); } } $ gcj -C ClassIndex.java $ gcj --version gcj (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- Summary: GCJ permits indexing by final object Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: cagney at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27399