From owner-freebsd-current@FreeBSD.ORG Fri Oct 31 09:20:24 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4822616A4CE for ; Fri, 31 Oct 2003 09:20:24 -0800 (PST) Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16A6943F85 for ; Fri, 31 Oct 2003 09:20:23 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.2.102]) by fafoe.narf.at (Postfix) with ESMTP id D25B03FA9; Fri, 31 Oct 2003 18:20:18 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 62D7588; Fri, 31 Oct 2003 18:20:17 +0100 (CET) Date: Fri, 31 Oct 2003 18:20:17 +0100 From: Stefan Farfeleder To: Erik Trulsson Message-ID: <20031031172015.GD866@wombat.fafoe.narf.at> Mail-Followup-To: Erik Trulsson , Garrett Wollman , Bruce Evans , current@freebsd.org References: <3F9F4FE6.29C4E178@mindspring.com> <3FA0EEFD.431DD759@mindspring.com> <20031030120925.K80335@beagle.fokus.fraunhofer.de> <200310301659.h9UGxAPk023337@khavrinen.lcs.mit.edu> <20031031174658.T3463@gamplex.bde.org> <200310311506.h9VF6h8T030897@khavrinen.lcs.mit.edu> <20031031154337.GA19287@falcon.midgard.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031031154337.GA19287@falcon.midgard.homeip.net> User-Agent: Mutt/1.5.4i cc: current@freebsd.org cc: Garrett Wollman Subject: Re: Anyone object to the following change in libc? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2003 17:20:24 -0000 On Fri, Oct 31, 2003 at 04:43:37PM +0100, Erik Trulsson wrote: > Perhaps not smaller in terms of the sizeof operator, but why can't one > have a 16-bit char, and an int8_t which occupies 16 bits, but only uses > 8 of them - the other 8 being padding? 7.18.1.1 Exact-width integer types 1 The typedef name intN_t designates a signed integer type with width N, no padding bits, and a two's complement representation. Thus, int8_t denotes a signed integer type with a width of exactly 8 bits. > Where in C99 does it say that uint8_t can't have padding bits? > I can't find anything in n869.txt to that effect. > As far as I can tell, the only type that is not allowed to have any > padding bits or trap representations is unsigned char. uint8_t is int8_t's corresponding unsigned type. This means sizeof(uint8_t) == sizeof(int8_t), thus uint8_t can't have padding bits either. Cheers, Stefan