stdint.h INT_LEAST defines
Sun Mar 9 21:56:00 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
According to Howland Craig D (Craig) on 3/7/2008 4:13 PM:
| So the basic question that this email is raising is: are the INT_LEAST
| set of defines supposed to reflect the actual range that the respective
| int_least types can hold, or should they only reflect the range that
| are required to hold?
POSIX requires the existence an 8-bit type (ie. char), and requires that
int_least<N>_t be the smallest type that has at least <N> bits with no
smaller type having enough bits. Therefore, int_least8_t is required to
be exactly 8 bits, so your complaint is not worth worrying about.
Now, for int_least16_t, we may have something worth discussing - it is
theoretically conceivable to have a platform with only 1-byte and 4-byte
(but no 2-byte) types, meaning int_least16_t could be a 32-bit type. But
since newlib doesn't target such a (theoretical) platform, this
conversation is still not worth worrying about.
Don't work too hard, make some time for fun as well!
Eric Blake email@example.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Newlib