Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!mirror!mguyott From: mguyott@mirror.TMC.COM (Marc Guyott) Newsgroups: comp.lang.c Subject: Re: 64 bit ints Message-ID: <19175@mirror.TMC.COM> Date: 31 Oct 88 19:07:05 GMT Article-I.D.: mirror.19175 References: <6264@june.cs.washington.edu> <225800084@uxe.cso.uiuc.edu> Reply-To: mguyott@prism.TMC.COM (Marc Guyott) Organization: Mirror Systems, Cambridge Mass. Lines: 27 In article <225800084@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: > > >>Suppose I am designing a C compiler for a machine with 64bit >>words. >>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? >> >The answer here should be very clear: > Make the compiler so that it can handle the general case of > int 32 bits Didn't K&R define an "int" as being the natural word size of the hardware that you are running on? So for an 80286 an int should be 16 bits, for a machine with a 32 bit word an int should be 32 bits, and for the machine described above an int should be 64 bits. Comments? Marc ---- ... I never saw the morning until I stayed up all night ... Tom Waits Marc Guyott mguyott@mirror.TMC.COM {mit-eddie, pyramid, harvard!wjh12, xait, datacube}!mirror!mguyott Mirror Systems Cambridge, MA 02140 617/661-0777