n bit architectures and C/C++

Chris Jones chrisj at pdx041.intel.com
Thu May 23 09:55:38 AEST 1991


In article <1991May22.211056.19387 at ready.eng.ready.com>, dhoward at 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 at ichips.intel.com          | Intel, it is purely coincidental, since  }
{ (503) 696-4022                   | Intel would never comment on such matters}
+----------------------------------+------------------------------------------+



More information about the Comp.lang.c mailing list