From owner-freebsd-chat Sat Feb 24 18: 8:59 2001 Delivered-To: freebsd-chat@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 7CBC637B401 for ; Sat, 24 Feb 2001 18:08:56 -0800 (PST) (envelope-from nectar@nectar.com) Received: by gw.nectar.com (Postfix, from userid 1001) id 019D918C91; Sat, 24 Feb 2001 20:08:55 -0600 (CST) Date: Sat, 24 Feb 2001 20:08:55 -0600 From: "Jacques A. Vidrine" To: Terry Lambert Cc: Brad Knowles , "Michael C . Wu" , j mckitrick , freebsd-chat@FreeBSD.ORG Subject: Re: bad programming practice? Message-ID: <20010224200855.B31832@spawn.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , Terry Lambert , Brad Knowles , "Michael C . Wu" , j mckitrick , freebsd-chat@FreeBSD.ORG References: <20010224090425.A30456@spawn.nectar.com> <200102242014.NAA23639@usr05.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102242014.NAA23639@usr05.primenet.com>; from tlambert@primenet.com on Sat, Feb 24, 2001 at 08:14:50PM +0000 X-Url: http://www.nectar.com/ Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, Feb 24, 2001 at 08:14:50PM +0000, Terry Lambert wrote: > > > (personally, I still think there should be sized types, > > > > Do you mean as in , or something else? [snip] > The language needs sized types, since it's intended to be capable > of mapping hardware, directly. [snip] > For things you don't care about, there need to be "at least" > sizes; this lets the machine pick a "preferred" size for both > registers and bus transfers. These are things that C99's seem to provide. Excerpt from ISO 9899:1999 section 7.18: 1 The header declares sets of integer types having specified widths, and defines corresponding sets of macros. It also defines macros that specify limits of integer types corresponding to types defined in other standard headers. 2 Types are defined in the following categories: integer types having certain exact widths; integer types having at least certain specified widths; fastest integer types having at least certain specified widths; integer types wide enough to hold pointers to objects; integer types having greatest width. e.g. uint24_t i286addr; uint_least16_t offset; int_fast16_t accum; Unfortunately, many of these types are optional, and I guess GCC doesn't supply a stdint.h yet. -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message