+2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
+ foul of type-based aliasing.
+
2002-09-30 Anthony Green <green@redhat.com>
* gcj.texi (Invoking jv-scan): Fix texinfo.
break;
case CONSTANT_Float:
{
- jfloat fnum = JPOOL_FLOAT (jcf, index);
- fprintf (out, "%s%.10g", verbosity > 0 ? "Float " : "", (double) fnum);
+ union
+ {
+ jfloat f;
+ int32 i;
+ } pun;
+
+ pun.f = JPOOL_FLOAT (jcf, index);
+ fprintf (out, "%s%.10g",
+ verbosity > 0 ? "Float " : "", (double) pun.f);
if (verbosity > 1)
- fprintf (out, ", bits = 0x%08lx", (long) (* (int32 *) &fnum));
+ fprintf (out, ", bits = 0x%08lx", (long) pun.i);
+
break;
}
case CONSTANT_Double: