This is the mail archive of the mailing list for the glibc 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: libc/sysdeps/generic stdint.h

On Sat, 25 Apr 2009, wrote:

> CVSROOT:	/cvs/glibc
> Module name:	libc
> Changes by:	2009-04-25 07:11:27
> Modified files:
> 	sysdeps/generic: stdint.h 
> Log message:
> 	(WINT_MAX): Define as 2147483647 since this is the maximum UCS4 value.

This is incorrect (the previous r1.8 change was correct; this one reverts 
that but also causes the macro to expand to an expression with the wrong 
type); all the limits in stdint.h are limits of integer types rather than 
of values with particular semantics that may be stored in them.  This will 
cause the GCC 4.5 test for C99-conforming stdint.h to fail.  The maximum 
value wint_t can store is 4294967295u (which also happens to be the value 

Note that C99 specifies that if wint_t is a signed type then WINT_MIN 
shall be no greater than -32767.  This would obviously be nonsense if it 
referred to limits of valid characters rather than of the underlying 
integer type, since negative values are not valid characters.

Joseph S. Myers

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