SIZEOF

Kevin Szabo ksbszabo at wateng.UUCP
Sun Feb 3 13:22:04 AEST 1985


As Guy says, sizeof( int ) != sizeof( int *).

However, a lot of code depends on the two sizes being the same
(unfortunately). We have a 68k beast with a Micrsoft port of 
systemIII. On this machine an Int is 32 bits. Isn't an int supposed
to be the natural word size for a machine? Is 32 bits a natural
size for a 68000? I guess it will be for the 68k which have
32 bit busses, but what about the machine with the 16 bit data bus?

I have a feeling that the integer size was picked more for porting
convenience than anything else, of course I have been wrong many times
before.
-- 
Kevin Szabo  watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)



More information about the Comp.lang.c mailing list