bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HP-UX 11.23 stdint failure (was: snapshot 3 in preparation for 1.4.1


From: Eric Blake
Subject: Re: HP-UX 11.23 stdint failure (was: snapshot 3 in preparation for 1.4.13)
Date: Wed, 25 Feb 2009 18:50:25 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]