[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]
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."
- [Freeciv-Dev] Compaq Tru64 Unix Alpha platform - Building freeciv, Davide Pagnin, 2002/05/12
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Ben Webb, 2002/05/12
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Raimar Falke, 2002/05/14
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Mark Metson, 2002/05/14
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv,
Raimar Falke <=
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Mark Metson, 2002/05/15
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Raimar Falke, 2002/05/15
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Mark Metson, 2002/05/15
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Reinier Post, 2002/05/15
- [Freeciv-Dev] Re: Compaq Tru64 Unix Alpha platform - Building freeciv, Mark Metson, 2002/05/15
|
|