summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-11 16:58:53 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-11 16:58:53 +0000
commit14da9d7b1d3e6e6f33425e4a7a5044ced3643a6a (patch)
tree23a772ae03a8850c16f12eabc55fa1afaf2c84c0 /gcc/java
parentd498e0905b9a0ef99cd67f9a497fd8138c0ccf40 (diff)
downloadgcc-14da9d7b1d3e6e6f33425e4a7a5044ced3643a6a.tar.gz
Fix java bootstrap on 32-bit targets
* jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1 results to long to match formats. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186330 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jcf-dump.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 38fc269a3e0..6f75740d213 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
+ results to long to match formats.
+
2012-04-11 Andrew Haley <aph@redhat.com>
* jcf-reader.c (jcf_parse_bootstrap_methods): Add
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index 9173ea473cc..67233d11c0e 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -926,19 +926,20 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
case 3:
case 4:
if (verbosity > 0)
- fprintf (out, "Fieldref: %ld=", JPOOL_USHORT2 (jcf, index));
+ fprintf (out, "Fieldref: %ld=", (long) JPOOL_USHORT2 (jcf, index));
print_constant (out, jcf, JPOOL_USHORT2 (jcf, index), 0);
case 5:
case 6:
case 7:
case 8:
if (verbosity > 0)
- fprintf (out, "Methodref: %ld=", JPOOL_USHORT2 (jcf, index));
+ fprintf (out, "Methodref: %ld=", (long) JPOOL_USHORT2 (jcf, index));
print_constant (out, jcf, JPOOL_USHORT2 (jcf, index), 0);
break;
case 9:
if (verbosity > 0)
- fprintf (out, "InterfaceMethodref: %ld=", JPOOL_USHORT2 (jcf, index));
+ fprintf (out, "InterfaceMethodref: %ld=",
+ (long) JPOOL_USHORT2 (jcf, index));
print_constant (out, jcf, JPOOL_USHORT2 (jcf, index), 0);
break;
}
@@ -946,7 +947,7 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
}
case CONSTANT_MethodType:
if (verbosity > 0)
- fprintf (out, "MethodType %ld: ", JPOOL_USHORT1 (jcf, index));
+ fprintf (out, "MethodType %ld: ", (long) JPOOL_USHORT1 (jcf, index));
print_signature (out, jcf, JPOOL_USHORT1 (jcf, index), 0);
break;
case CONSTANT_InvokeDynamic:
@@ -954,7 +955,8 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
uint16 name_and_type = JPOOL_USHORT2 (jcf, index);
if (verbosity > 0)
fprintf (out, "InvokeDynamic: ");
- fprintf (out, "bootstrap_method: %ld ", JPOOL_USHORT1 (jcf, index));
+ fprintf (out, "bootstrap_method: %ld ",
+ (long) JPOOL_USHORT1 (jcf, index));
if (verbosity == 2)
fprintf (out, " name_and_type: %d=<", name_and_type);
print_constant_terse (out, jcf, name_and_type, CONSTANT_NameAndType);