64 bit architectures and C/C++

Walter Bright bright at nazgul.UUCP
Fri May 3 03:07:37 AEST 1991


In article <12563 at dog.ee.lbl.gov> 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). 
/It does cause problems---there is always software that makes invalid
/assumptions---but typically long-vs-int problems, while rampant, are
/also easily fixed.

The most aggravating problem we have is it seems we (Zortech) are the only
compiler for which:
	char
	signed char
	unsigned char
are all distinct types! For example,
	char *p;
	signed char *ps;
	unsigned char *pu;
	p = pu;			/* syntax error */
	p = ps;			/* syntax error */
It seems we are the only compiler that flags these as errors.
A related example is:
	int i;
	short *ps;
	*ps = &i;		/* syntax error, for 16 bit compilers too */
I think a lot of people are in for a surprise when they port to 32 bit
compilers... :-)



More information about the Comp.lang.c mailing list