@RichFelker With such implementation-defined choices, "d" is “suitable for use within the format argument of a formatted …/output function”
-
-
Replying to @volatile_void
@spun_off Oh, you're saying they should be "d" not "u"? Yes, probably so. Or "hhu" and "hu", but I don't even get the point of the "h" mod.
1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker Obviously "h" and "hh" exist in printf for the sake of printf("…%hhn",…), when one wants to store # chars printed to a char.1 reply 0 retweets 0 likes -
Replying to @volatile_void
@spun_off Yes but "h" and "hh" are defined for "d", "x", "u", "i", and "o" too, for no apparent reason.
1 reply 0 retweets 0 likes -
Replying to @RichFelker
@RichFelker @spun_off You cannot use "d" for unsigned char if char is not guaranteed to be strictly smaller than int. And it isn't in C std.1 reply 0 retweets 0 likes -
Replying to @ch3root
@ch3root@RichFelker You cannot use "d" if you target architectures that have this property, that's right.1 reply 0 retweets 0 likes -
Replying to @volatile_void
@ch3root@RichFelker The choice is between sending int arguments to %u on 999‰ archs or sending unsigned int args to %d on the remaining <1‰1 reply 0 retweets 0 likes -
Replying to @volatile_void
@spun_off
@RichFelker Not sure what you mean, "hh" is there to solve the problem.1 reply 0 retweets 0 likes -
Replying to @ch3root
@ch3root@RichFelker I am coming to the conclusion that "hhu" should be taken to mean “take an int argument, print as unsigned char”. Rich?2 replies 0 retweets 0 likes -
Replying to @volatile_void
@spun_off
@RichFelker more like "take an int argument, assume it came from unsigned char and convert it back before printing", 7.21.6.1p71 reply 0 retweets 2 likes
-
-
Replying to @RichFelker
@spun_off
@ch3root Rather: "take a promoted-uchar-type argument, assume it came from unsigned char and convert it back before printing"0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.