Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!rice!uw-beaver!zephyr.ens.tek.com!tektronix!reed!intelhf!ichips!pdx041!chrisj From: chrisj@pdx041.intel.com (Chris Jones) Newsgroups: comp.lang.c Subject: n bit architectures and C/C++ Message-ID: <1991May22.235538.9548@ichips.intel.com> Date: 22 May 91 23:55:38 GMT References: <1991May9.192156.19291@nightowl.MN.ORG> <313@orac.UUCP> <6659@gssc.UUCP> <1991May22.211056.19387@ready.eng.ready.com> Sender: news@ichips.intel.com (News Account) Reply-To: chrisj@ichips.intel.com Organization: INTEL X86 Focus Group Lines: 28 In article <1991May22.211056.19387@ready.eng.ready.com>, dhoward@ready.eng.ready.com (David Howard) writes: |> The question as to whether C types should map to the architecture or |> to what is easiest on the programmer is an interesting one. Indeed. IMHO, a language should not be mapped to any particular architecture. This creates problems (like the question posed at the beginning of this stream long ago...) The compiler should be responsible for implementing the wishes of the programmer, no matter how warped it is in relation to the particular chip it is running on. Unfortunately, the designers of C could not forsee the need for n-bit integers. Wouldn't it be nice to just be able to do this... typedef int24 int /* This program needs to use 24 bit integers */ typedef int35 long /* and 35 bit longs. No matter what it takes. */ Note that portability issues would be lessened, as compilers would be forced to implement the original wishes of the programmer. Programmers would still program for efficiency, so 16/32/64 bit ints/longs would dominate anyway. I realize that this raises more issues, like, what is MAXINT? I'd sure hate to implement this, though. S'pose it's too late, anyway. +----------------------------------+------------------------------------------+ { Chris S Jones, Intel Corp. | The opinions expressed above probably do } { 5200 NE Elam Young Pkwy, JF1-58 | not reflect the opinions of Intel. If } { Hillsboro, OR 97124 | they actually do reflect the opinions of } { chrisj@ichips.intel.com | Intel, it is purely coincidental, since } { (503) 696-4022 | Intel would never comment on such matters} +----------------------------------+------------------------------------------+