On May 25, 2009, at 1:21 PM, Duane Ellis wrote:
zach>Sorry Rick, but I think that you and Duane have lost this argument. You have failed to defend your position with facts.I was asking more for an opinion, and the *REASON* I wanted to ask this was the recent rash of "printf()" formatter warning fixes, etc - and how this mess plays out over different host platform, arches, etc.ie: "u32" can be created a "zillion ways" on some platforms, however - to stop 'printf' warnings one should perform "X" - what ever that is - and that step is a noble goal in it self. I thought - perhaps wrongly - that somebody could point me at something that says the "portable cross platform c99 way of printing a "uint<whatever>_t" would be specifier "X" or something like that.If that did exist, then yes there is a technical reason that method X is better then Y, and that technical reason wins.
Actually, this does exist. As part of C99, not only are the types like uin32_t defined but there is a corresponding macro PRIu32 that is the format code for printing a uint32_t. These exist for all the C99- defined integer types (int8_t, uint8_t, int16_t, etc). See inttypes.h.
-- Rick Altherr kc8...@kc8apf.net"He said he hadn't had a byte in three days. I had a short, so I split it with him."
-- Unsigned
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development