Public bug reported:

Ubuntu 11.04
reference: 
http://pubs.opengroup.org/onlinepubs/007904975/basedefs/inttypes.h.html

inttypes.h defines macros for fixed integer types.  The ones for 8- and
16-bit types are currently the same as the 32-bit types, which pretty
much makes them useless.

PRIx16 is x      I suggest it should be hx
PRIx8 is x        I suggest it should be hhx

Otherwise, only by excruciatingly correct typecasting in the printf can you get 
the correct output for something like
int16_t this = -1;
printf("%" PRIx16 "\n", this);

As it stands, it will print 8 hex digits.  It makes more sense for it to
print 4.

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1036859

Title:
  stdint.h defines PRIx16 and similar in unhelful way

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1036859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to