Path: utzoo!attcan!uunet!ingr!crossgl From: crossgl@ingr.UUCP (Gordon Cross) Newsgroups: comp.lang.c Subject: Re: 64 bit ints Message-ID: <2777@ingr.UUCP> Date: 31 Oct 88 18:21:15 GMT References: <6264@june.cs.washington.edu> Organization: Intergraph Corp. Huntsville, Al Lines: 28 In article <6264@june.cs.washington.edu>, david@june.cs.washington.edu (David Callahan) writes: > > Suppose I am designing a C compiler for a machine with 64bit > words. "Char" should be 8bits of course and "long int" 64 since > pointers will be. > > How long should an "int" be (32 or 64)? > How about a "short int" (16/32)? > How is this decision altered if partial word accesses > are more expensive than full word accesses? As I recall the proposed ANSI standard states that the type "int" should be the size which is most "natural" or efficient on the target machine. This has been 32-bits on all 64-bit machines I've seen. If your machine has a 64-bit word size and a halfword (32 bits) access is more expensive then perhaps a 64-bit "int" is appropiate. Seems like that if your machine has support for 8, 16, 32, AND 64 bit integers then your only choice would have to be char 8 bits short 16 bits int 32 bits long 64 bits unless someone wants to introduce "short short int" and/or "long long int"!!!! Gordon Cross Intergraph Corp. Huntsville, AL