switch constant issue

Andrew Haley aph@redhat.com
Mon Jun 9 18:05:00 GMT 2003


Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 > 
 > Andrew> I guess this is OK, but I'm not sure.  It does rather break
 > Andrew> -fno-assume-compiled in that the constant uses early binding, so we
 > Andrew> might up with a different value for a constant that the one in its
 > Andrew> definition.
 > 
 > We just have to follow the Java language and binary compatibility
 > rules.  In this case, inlining the constant is correct, and in fact
 > required.

Or in this case the the Java language and binary compatibility
*in*compatibility rules!

 > Basically, this is a problem with Java for which the spec just
 > mandates a particular solution.  It isn't perfect; the standard class
 > libraries themselves change incompatibly from time to time :-(.  For
 > instance there is a constant in java.awt.event that changed in recent
 > memory (I forget which one offhand).

Eech.  Okay, you got me there.

Andrew.



More information about the Java mailing list