Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv
Home

[Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Mark Metson <markm@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 May 2002 09:38:18 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, May 15, 2002 at 01:06:45AM -0300, Mark Metson wrote:
> 
> On Sun, 12 May 2002, Davide Pagnin wrote:
> 
> > (I imagine that alla of you know that alpha processor are true 64 bit,
> > instead of 32 bit like Intel x86 processors)
> 
> > Any strong opinion on how is the right (TM) way to resolve this issue?
> 
> > This make the compiler warn of a conversion from pointer to integer
> > of different size, because obviously pointers on alpha are 64 bit,
> > and int are 32 bit.
> 
> According to my understanding of e.g. K&R, int is to be whatever size is 
> the true size of that processor, hence int on a 64bit machine is 64 bit. 
> When, if ever, did that purportedly universal, and quite simple, standard 
> get changed? It seems to me that int has no business being 32 bits on a 64 
> bit machine, in 'C'. Did the ANSI standard specify that K&R were wrong on 
> that point and specify some other algorithm for deriving int size from 
> true bitsize of a word on the processor? Or are we talking some other 
> language (Does even C++ specify a different algorithm for such 
> derivation?)

You just not have enough types:
 8 bit - char
 16 bit - short int
 32 bit - int
 64 bit - long int
 128 bit - long long int

So if you make int now 64 bit you can decide whether short int is 16
bit or 32 bit. But you loose one.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Make it idiot-proof and someone will make a better idiot."


[Prev in Thread] Current Thread [Next in Thread]