This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
minor jcf-dump.c patches
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: minor jcf-dump.c patches
- From: Per Bothner <per at bothner dot com>
- Date: 30 Aug 2001 12:44:35 -0700
I checked the following into the trunk. Only the first is an actual bug fix.
2001-08-30 Per Bothner <per@bothner.com>
* jcf-dump.c (print_constant): Fix fencepost error so "Float" and
"Double" are printed at verbosity 1.
* jcf-dump.c (main): Disable flag_print_attributes if --javap.
* jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
Index: jcf-dump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-dump.c,v
retrieving revision 1.37
diff -u -r1.37 jcf-dump.c
--- jcf-dump.c 2001/08/16 21:52:14 1.37
+++ jcf-dump.c 2001/08/30 19:41:28
@@ -504,7 +504,7 @@
case CONSTANT_Float:
{
jfloat fnum = JPOOL_FLOAT (jcf, index);
- fprintf (out, "%s%.10g", verbosity > 1 ? "Float " : "", (double) fnum);
+ fprintf (out, "%s%.10g", verbosity > 0 ? "Float " : "", (double) fnum);
if (verbosity > 1)
fprintf (out, ", bits = 0x%08lx", (long) (* (int32 *) &fnum));
break;
@@ -512,7 +512,7 @@
case CONSTANT_Double:
{
jdouble dnum = JPOOL_DOUBLE (jcf, index);
- fprintf (out, "%s%.20g", verbosity > 1 ? "Double " : "", dnum);
+ fprintf (out, "%s%.20g", verbosity > 0 ? "Double " : "", dnum);
if (verbosity > 1)
{
int32 hi, lo;
@@ -889,6 +889,7 @@
case OPT_JAVAP:
flag_javap_compatible++;
flag_print_constant_pool = 0;
+ flag_print_attributes = 0;
break;
default:
@@ -1201,10 +1202,10 @@
#define SPECIAL_IINC(OPERAND_TYPE) \
i = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \
- fprintf (out, " %ld", (long) i); \
- INT_temp = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \
+ fprintf (out, " %d", i); \
+ i = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \
saw_wide = 0; \
- fprintf (out, " %ld", (long) INT_temp)
+ fprintf (out, " %d", i)
#define SPECIAL_WIDE(OPERAND_TYPE) \
saw_wide = 1;
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/