64 bit architectures and C/C++

Shankar Unni shankar at hpcupt3.cup.hp.com
Fri May 3 16:35:15 AEST 1991


In comp.lang.c, torek at elf.ee.lbl.gov (Chris Torek) writes:

> In article <168 at shasta.Stanford.EDU> shap at shasta.Stanford.EDU (shap) writes:
> >How bad is it for sizeof(int) != sizeof(long). 

> This has been the case on PDP-11s for over 20 years.

> It does cause problems---there is always software that makes invalid
> assumptions---but typically long-vs-int problems, while rampant, are
> also easily fixed.

Well, lint goes a long way towards pointing out int-long mismatches, etc.
But in my (humble?) opinion, much trouble would be headed off if C compilers
on 64-bit architectures would simply dispense with the 16-bit type and make
sizes of int == long == void * == 64 bits, and short == 32 bits.  Why is it
so terribly important to have a 16-bit data type?

In any case, memory is getting cheaper these days..
-----
Shankar Unni                                   E-Mail:
HP India Software Operation, Bangalore       Internet: shankar at india.hp.com
Phone : +91-812-261254 x417                      UUCP: ...!hplabs!hpda!shankar



More information about the Comp.lang.c mailing list