[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561685: gcj-jdk: class PrintStream method printf doesn't print floats



tags 561685 + upstream
tags 561685 + wontfix
thanks

not forwarding this myself to gcj/classpath. please report this yourself upstream.

On 19.12.2009 13:17, Peter T. Breuer wrote:
Package: gcj-jdk
Version: 4:4.4.2-2
Severity: normal


This test program

class Test {

    public static void main(String argv[]) {

        Object args[] = {
            new Float(0.0001),
        };
        System.err.printf("%f\n", args);
    }
}

produces no output when compiled with gcj (gcj Test.java --main=Test
-o Test) and run (./Test).

The correct output is produced when the bytecode is produced by javac
and run with the java virtual machine:

   % javac Test.java
   % java Test
   0.000100

printf is generally messed up anyway. The %x format insists on
printing 64 bit numbers even when given 32 bit integers as feed, and
it sign-extends them all, reulting in 0xffffffff80000000 output from
integer 0x8000000.

And %g doesn't print anything either.




Reply to: