Richard Biener changed bug 917559
What Removed Added
Status NEW RESOLVED
Resolution --- UPSTREAM

Comment # 1 on bug 917559 from
       o, u, x, X
              The  unsigned  int  argument is converted to unsigned octal (o),
              unsigned decimal (u), or unsigned hexadecimal (x  and  X)  nota-
              tion.   The  letters abcdef are used for x conversions; the let-
              ters ABCDEF are used for X conversions.  The precision, if  any,
              gives the minimum number of digits that must appear; if the con-
              verted value requires fewer digits, it is  padded  on  the  left
              with zeros.  The default precision is 1.  When 0 is printed with
              an explicit precision 0, the output is empty.

but you pass an int (unsigned short is promoted to int when passed as
variadic argument according to the C standard).  Of course the warning could
be avoided here because we know that even though technically you pass an int
it's value will be in the range of [0, USHORT_MAX].

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65040

You can work around by writing

  printf ("%x\n", (unsigned)arg);

but I suggest to wait for the bug to be fixed.


You are receiving this mail because: