Subject: printf of long long broken?
From: [email-masked] (Shankar Unni)

15 Jan 1997 19:47:04 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.18 i586)
Original-To: [email-masked]
Original-Sender: [email-masked]

I tried to compile and run the following program using Beta 17.1:

 #include <stdio.h>
 main()
 {
    long long ll = 0x0123456789abcdefLL;
    printf("%llx %x\n", ll, 0x100);
 }

This program prints out:

 89abcdef 1234567

Looks like printf is simply treating "%llx" as "%lx", and gets totally
out of sync.

This program works on non-windows Intel boxes, so I'm sure the program
is correct. I assume the library that's in cygwin.dll is "newlib": did
it get built somehow with _NO_LONGLONG?

By the way, in a related vein, I notice that %llx doesn't work in
Microsoft C++ either (they insist on "%I64x"), so we're kinda screwed
here..
-- 
Shankar Unni                                  [email-masked]
Chromatic Research                            (408) 752-9488
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".