Fix UINT{8,16}_C

Eric Blake ebb9@byu.net
Sun Jul 2 21:03:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to POSIX, UINT{8,16}_C should result in an integer constant with
"the same type as would an expression that is an object of the
corresponding type converted according to the integer promotions."  And
according to C, unsigned char promotes to signed int, when int is wider
than char.  Gnulib now tests for bugs in stdint.h, and these are the
remaining two issues that makes cygwin's version non-compliant:

2006-07-02  Eric Blake  <ebb9@byu.net>

	* include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
	than int promote to signed int.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEqDR/84KuGfSFAYARAnkuAJ9oKW4FEnOVPythNkGLs0Mw0+QQsgCbBwTy
VCM75i+6nr3jYZXs3qrhLZw=
=iYl2
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.patch2
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20060702/f50a3101/attachment.ksh>


More information about the Cygwin-patches mailing list