Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!jarthur!uunet!ns-mx!ccad.uiowa.edu!cadsi From: cadsi@ccad.uiowa.edu (CADSI) Newsgroups: comp.lang.c++ Subject: Re: 64 bit architectures and C/C++ Message-ID: <1991May3.143944.1220@ccad.uiowa.edu> Date: 3 May 91 14:39:44 GMT References: <471@heurikon.heurikon.com> Organization: CAD-Research, U. of Iowa, Iowa City, Iowa Lines: 32 From article <471@heurikon.heurikon.com>, by daves@ex.heurikon.com (Dave Scidmore): > warren@cbnewsh.att.com (warren.a.montgomery) writes: >>There are probably a lot of hidden assumptions in programs that >>sizeof(short)==2 and sizeof(long)==4 at this point, so any >>assignment of meanings on a 64 bit machine (unless you invent type >>"long long" for 64 bits and leave long and short at 32 and 16) >>will cause some pain. >> >>All this raises questions about C/C++'s philosophy of integer type >>specification, which no doubt dates from the days where all >>machines had only 2 and 4 byte integers. > > I doubt such a day ever existed. The early K&R book refered to machines > with 9 bit chars and 36 bit integers when describing the number of bits > in various quantities. > >>... How are things like this best >>expressed in C or C++? >>Do other languages provide better overall solutions? I add another fly to the ointment. What about bit sliced machines. At the low level, they really are 2 and 4 bit processors. At the high level (most human interaction levels) they are more like 32 and/or 64 bit machines. So, is this always a seperate issue from the compiler? I'm a little ignorant about the middle level of these machines, this is why I ask. |----------------------------------------------------------------------------| |Tom Hite | The views expressed by me | |Manager, Product development | are mine, not necessarily | |CADSI (Computer Aided Design Software Inc. | the views of CADSI. | |----------------------------------------------------------------------------|