casts to (void) [considered harmful]

VLD/VMB gwyn at BRL.ARPA
Fri Aug 9 07:49:58 AEST 1985


typedef	unsigned short	int16;
typedef	unsigned long	int32;

(note the bug fix, also) is equivalent to what you were trying to do,
but does not need to be rewritten for different machines.

In any case, most experienced C programmers will use "short" when 16
bits is known to suffice and "long" when 32 bits are needed.  This is
certainly not the main portability problem.



More information about the Comp.lang.c mailing list