This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj bug: case constants


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]