Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2003 18:01:34 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        current@freebsd.org
Subject:   Re: Anyone object to the following change in libc?
Message-ID:  <20031031174658.T3463@gamplex.bde.org>
In-Reply-To: <200310301659.h9UGxAPk023337@khavrinen.lcs.mit.edu>
References:  <BAEB9CED-091F-11D8-B483-000393BB9222@queasyweasel.com> <3F9F4FE6.29C4E178@mindspring.com> <3FA0EEFD.431DD759@mindspring.com> <20031030120925.K80335@beagle.fokus.fraunhofer.de> <200310301659.h9UGxAPk023337@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 30 Oct 2003, Garrett Wollman wrote:

> <<On Thu, 30 Oct 2003 12:32:46 +0100 (CET), Harti Brandt <brandt@fokus.fraunhofer.de> said:
>
> > "The c89 utility (which specified a compiler for the C Language specified
> > by the 108 ISO/IEC 9899: 1990 standard) has been replaced by a c99 utility
> > (which specifies a compiler for 109 the C Language specified by the
> > ISO/IEC 9899: 1999 standard)."
>
> More specifically: IEEE Std. 1003.1-2001 is aligned to ISO/IEC
> 9899:1999 in all respects.  C99 alignment was one of the principal
> reasons for bringing out a whole new standard in the first place,
> rather than continuing the amendment process.  (This is also why POSIX
> now requires eight-bit bytes.)

This doesn't follow, since C99 doesn't require 8-bit bits.  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.

POSIX requires in addition [u]int{8,16,32}_t, and [u]int64_t if 64 bit
integer types exist.  It says that the existence of int8_t implies
that a byte is 8 bits and CHAR_BIT is 8.  I'm not sure what prevents
int8_t being smaller than char.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031031174658.T3463>