This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: long unsigned int vs. uint32_t again


Chuck wrote:
> cygwin's <inttypes.h> has:
> #define PRIu32 "lu"
>
> and <stdint.h> has
> typedef unsigned int uint32_t;
>
> Is it possible that our inttypes.h should be changed, to use "u" for 8, 16, and 32 bits?

Yep, I'd say so.

>?Or is gcc's -Wformat=2 in 3.4.4 just too strict here -- and should be checking
> the actual bitwidths of types against the formats, before assuming that
> "lu" doesn't match uint32_t?

No. "long" and "int" are different types, and ignoring this would just
store up trouble for when code is ported to platforms with 64-bit
longs.

Andy

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]