This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/12593] PRI*8 and PRI*16 formats use too many bits


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.


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