Re: [EXTERNAL]: Re: Why int32_t is long int on 32 Bit Intel?
Grant Edwards <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 2023-07-28, Richard Damon <[email protected]> wrote: > Actually, it is showing you are using the “wrong” format. If you are > printing an int32_t, you should be using the format out of > inttypes.h to be correct, even if it is “ugly”. Huh. I never knew about inttype.h until now and always wondered about the "official" way to deal with this problem. [IMO, it definitely is ugly.] I tended to use the %ld with a (long) cast solution -- which doesn't generate any extra code and is easy to read, but it still didn't seem "right". -- Grant