Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: 64 bit ints Message-ID: <418@sdrc.UUCP> Date: 30 Oct 88 15:24:18 GMT References: <6264@june.cs.washington.edu> <225800084@uxe.cso.uiuc.edu> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 32 In article <225800084@uxe.cso.uiuc.edu>, mcdonald@uxe.cso.uiuc.edu writes: < [without attribution] < >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? < The answer here should be very clear: < Make the compiler so that it can handle the general case of < char 8 bits < short int 16 bits < int 32 bits < long int 64 bits. < < Then allow the user to specify, either by an "install" program, < by command line switches, by a "config" file, or by (gasp) pragmas, < whatever combination of shorts, ints and longs he wants, so < long as they fit the usual rules of C. The answer may be clear, but it's also wrong (at least by some standards). The draft ANSI standard requires that int be the same size as either short or long; it may not be a third, distinct, size of integer. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.uucp 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "Save the Quayles" - Mark Russell