Re: Anyone object to the following change in libc?

From: Bruce Evans <bde_at_zeta.org.au>
Date: Fri, 31 Oct 2003 22:30:17 +1100 (EST)
On Fri, 31 Oct 2003, Terry Lambert wrote:

> Bruce Evans wrote:
> > ...  int8_t is
> > optional in C99 and all code that uses it unconditionally is unportable.
> > Similarly for most other types in <stdint.h>.  The required ones are
> > [u]int_least{8,16,32,64}_t and [u]int_fast{8,16,32,64}_t and [u]intmax_t,
> > i.e., nothing that can't be declared in C90 except a 64-bit type.
>
> I believe that you meant to say uint8_t is optional, and int8_t is
> required (see /usr/src/sys/*/include/_types.h).  I think this was a
> concession to IBM, which defaulted to unsigned characters, and
> lacked a "signed" keyword in its compilers.

No,  I meant what I wrote.  All fixed-width types are optional, at least
in the C99 draft (n869.txt).  There is nothing special about uint8_t vs
int8_t except that it might not exist for a different reason.

Bruce
Received on Fri Oct 31 2003 - 02:30:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:27 UTC