Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) Newsgroups: comp.lang.c Subject: Re: 64 bit architectures and C/C++ Message-ID: <1991May4.202438.14664@ux1.cso.uiuc.edu> Date: 4 May 91 20:24:38 GMT Organization: University of Illinois at Urbana Lines: 31 What would be the best way to do this: I want to pass around integer numbers that I know will require more than 32 bits but not more than 63 bits. An example of such a number of the number of microseconds in the century. The uses include passing them to functions as arguments and receiving them back as return values. I want to specify it sufficiently that a reasonable implementation on a 64 bit machine will in fact use the 64 bit integer instructions. Whatever way it is to be specified should work on all such 64 bit machines. If I were to use an array of smaller integers, I'd have to code specific macros or functions to apply operations to these values that would be more preferrable to do as simple arithmetic operations. But the big deal is that a 64-bit machine would not get to use its 64-bit capabilities. It does no good to get a 64-bit machine if it is just going to be doing 32-bit data operations all the time. But of course I want to do it portable within the scope of 64 bit machines. Shouldn't "long" always represent at least the longest natural operation width on the given architecture, so that it is at least POSSIBLE to code applications that need that architecture? (I am speaking in terms of current and future directions in C, not in compatibility of old code, which is a separate issue) -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu | Guns don't aim guns at \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / \***************************************************************************/