Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 1998 21:27:47 +0100 (CET)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: New typedefs in sys/types.h
Message-ID:  <199801192027.VAA29154@dorifer.heim3.tu-clausthal.de>

next in thread | raw e-mail | index | archive | help
Andrew Kenneth Milton <akm@mother.sneaker.net.au> 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)



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