Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33823 )
Change subject: src: Use standard <inttypes.h> ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33823/11/src/include/inttypes.h File src/include/inttypes.h:
https://review.coreboot.org/c/coreboot/+/33823/11/src/include/inttypes.h@71 PS11, Line 71: #define PRIiFAST8 "i" /* int_fast8_t */
Yes, that's what I mean by "it doesn't actually matter as long as you pass an argument of the right […]
It took me some time to understand the vtxprintf() implementation. It looks odd, but only because it _is_ standard compliant. I assume, because of the integer promotion C designers had to come up with something for the `h` and `hh` modifiers that is very unintuitive, "its value shall be converted to signed char or unsigned char before printing". This has two implications
1. `h` and `hh` modifiers for printing don't relate to the type of the argument but only restrict the range of the printed value, and 2. `printf("%hhi", 1000)` is valid and that it would overflow is the only case where an `hh` modifier makes sense for printing.
I guess there are two ways to go from here:
1. Keep it standard compliant, and "i" for the PRIi*{8|16} macros. 2. Ditch `h` and `hh` completely for printing (who's using that?).
It's already implemented, so I would prefer the former.