This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/12059] New: jcf-dump does not display float constants acurately


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12059

           Summary: jcf-dump does not display float constants acurately
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonniot at users dot sf dot net
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-debian-linux-gnu

There seems to be precision errors in the display of Float constants by jcf-dump

blanche ~/tmp/bug cat Float.java                               [01:09 26/08/03]
class Float
{
  public static void main(String[] args)
  {
    double d = 1.1;
    System.out.println(d);
  }
}
blanche ~/tmp/bug javac Float.java                             [01:09 26/08/03]
blanche ~/tmp/bug java Float                                   [01:10 26/08/03]
1.1

The problem is when disassembling the class file. javap does it correctly:
blanche ~/tmp/bug javap -c Float                               [01:10 26/08/03]
Compiled from Float.java
...
Method void main(java.lang.String[])
   0 ldc2_w #2 <Double 1.1>
...

jcf-dump writes instead:
blanche ~/tmp/bug jcf-dump-3.3 -c Float.class                  [01:10 26/08/03]
...
Method name:"main" public static Signature: 13=(java.lang.String[])void
Attribute "Code", length:44, max_stack:3, max_locals:3, code_length:12
  0: ldc2_w #2=<Double 1.1000000000000000888>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]