This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
improve type safety wrt unsignedness for java
- From: Mike Stump <mrs at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Jul 2004 14:20:09 -0700
- Subject: improve type safety wrt unsignedness for java
Java fails to be as portable as it should be in that it relies on an
overly lax compiler, this fixes it up. The changes come in two
flavors, the cast version, which is very safe, and the change the data
from unsigned to signed, or from signed to unsigned, which is slightly
more risky. I've chosen the first method for more instances, except
where it was exceedingly simple and obvious.
Note, in theory there can be other bits of the java compiler that are
compiled on other platforms that are not safe that will need fixing
post my other checkin. If anyone spots such a flaw, I'd be happy to
fix it, just let me know.
Ok?
reg tested on powerpc-apple-darwin7.4.0.
Attachment:
java-un.diff.txt
Description: Text document