switch constant issue
Tom Tromey
tromey@redhat.com
Mon Jun 9 17:55:00 GMT 2003
>>>>> "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.
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).
Jeff, I think my patch won't affect Steve's problem. That patch was
for a different case, where we would inline a non-{int,string}
constant incorrectly (causing link errors, as I recall). Steve is
seeing the opposite: we aren't inlining an int constant that we
should. I suspect this is a different front end problem (perhaps
unrelated to -fno-assume-compile -- I think we may have a PR for this
already, but I haven't looked).
Steve, your install directory says "3.4" but you are really using 3.3.
-fno-assume-compiled isn't supported on any branch yet, but there are
needed bug fixes in 3.4 that we won't be putting into the 3.3 series.
Tom
More information about the Java
mailing list