This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
gcj bug: case constants
- To: java-discuss@sourceware.cygnus.com
- Subject: gcj bug: case constants
- From: Jeff Sturm <jsturm@sigma6.com>
- Date: Tue, 22 Jun 1999 10:49:13 -0400
- Organization: AppNet Systems Inc.
gcj throws an error compiling switch statements with "static final"
elements as constants:
ObjectInputStream.java: In class `java.io.ObjectInputStream':
ObjectInputStream.java: In method `readObject()':
ObjectInputStream.java:27: Constant expression required.
case TC_NULL:
^
TC_NULL is declared as "public static final int". Other constant values
work fine, but it seems there is no way to use symbolic names in a
switch...case.
--
Jeff Sturm
jsturm@sigma6.com