Gary V. Vaughan <gary <at> gnu.org> writes:
> > l7 UINT8_MAX
> > l8 UINT16_MAX
> > l9 UINT32_MAX
> > =============================================
> > $ cc -AC99 i.c
>
> Trimming the system files fat leaves:
>
> l7 255u
> l8 65535u
> l9 4294967295ul
Yep. l7 and l8 demonstrate bugs in the system header's UINT8_C and UINT16_C -
they should result in 255 and 65535 (not 255u and 65535u). So how come this
check in stdint.m4 is not detecting it?
#include <stdint.h>
struct s{
/* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
int check_UINT8_C:
(-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
int check_UINT16_C:
(-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
};
What is uint_least8_t typedef'd to? What does the above snippet give when
preprocessed?
--
Eric Blake