This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12593] PRI*8 and PRI*16 formats use too many bits
- From: "christophe.lyon at st dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 18 Mar 2011 15:20:47 +0000
- Subject: [Bug libc/12593] PRI*8 and PRI*16 formats use too many bits
- Auto-submitted: auto-generated
- References: <bug-12593-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12593
--- Comment #2 from christophe.lyon at st dot com <christophe.lyon at st dot com> 2011-03-18 15:20:36 UTC ---
Well, if I compile & execute this sample code, there is a difference:
#include <stdio.h>
#include <inttypes.h>
int main()
{
char v=0xf0;
printf("char %hhx\n", v);
printf("short %hx\n", v);
printf("int %x\n", v);
printf("char pri %" PRIx8 "\n", v);
printf("short pri %" PRIx16 "\n", v);
printf("int pri %" PRIx32 "\n", v);
return 0;
}
At execution:
char f0
short fff0
int fffffff0
char pri fffffff0
short pri fffffff0
int pri fffffff0
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.