From owner-freebsd-hackers Mon Jan 19 12:56:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA16901 for hackers-outgoing; Mon, 19 Jan 1998 12:56:24 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA16836 for ; Mon, 19 Jan 1998 12:55:56 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id VAA29154 for freebsd-hackers@FreeBSD.ORG; Mon, 19 Jan 1998 21:27:47 +0100 (CET) (envelope-from olli) Date: Mon, 19 Jan 1998 21:27:47 +0100 (CET) From: Oliver Fromme Message-Id: <199801192027.VAA29154@dorifer.heim3.tu-clausthal.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: New typedefs in sys/types.h Newsgroups: list.freebsd-hackers Organization: Administration Heim 3 Reply-To: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: TIN [version 1.2 RZTUC(3) PL2] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Andrew Kenneth Milton wrote in list.freebsd-hackers: > +-----[ Oliver Fromme ]------------------------------ > | > | To make a long story short, I'd vote for LP64, that is, 8 bit > | chars, 16 bit shorts, 32 bit ints, 64 bit longs and pointers. > | Maybe even 128 bit long long (BTW, the upcoming C9X standard > | even legalizes "long long"). > > I would still like int to be the 'best' size of an int for performance > on a piece of hardware. >From a performance point of view, there is no difference between 32 bits and 64 bits on Alpha processors. > In any case I thought these things were determined > by the compiler, not the operating system, so someone is still free to > write a compiler that ignores your favourite sizes. It is my understanding that the type sizes are determined by the operating system. If you write a compiler which uses different sizes, you'll run into trouble when using syscalls. (Of course the libs of your compiler could try to "translate" the sizes, but that would open another can of worms.) I don't know how difficult it would be to modify gcc in order to have different sizes of the basic types, but it shouldn't be too difficult. > Quite frankly if you _rely_ on int being 32 signed bits, your code sucks, > or at least is very non-portable (which I consider to be the same thing, Agreed 100%. Regards Oliver -- Oliver Fromme, Leibnizstr. 18-61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)