C
Chris Hills
Paul Eggert said:It's not at all dumb to assume that int is at least 32 bits wide.
POSIX 1003.1-2001 (another ISO standard) requires it, as do the GNU
coding standards. Lots of portable C code safely assumes it.
No doubt there are still some C platforms with 16-bit int, or other
widths less than 32 bits, but such platforms are not of much interest
these days to authors of a wide class of portable software.
Whilst this may be true for some programmers the vast majority of
processors in use today are NOT 32bit. They are 8 bit. AFAIk 1 in 3
processors currently in use on the planet (and above it) are 8051
types!! there are plenty of other 8 bit types in wide spread use
(Motorola HC, AVR, PIC etc) . Then follows the 16 bit types and then the
32 bit types.
When I did a paper at an embedded conference I did a straw poll there
were people using 4 to 128 bit processors. I think it was in order of
max users:- 8, 16, 32, 64, 4, 128
It is only desk top programmers who have a blinkered view of what is in
use. BTW I 20 years of SW engineering on 8, 16, 32 and 64 bit systems I
have yet to write a 32 bit windows program or for that matter a program
what was required to be portable other than to other CPU of the same bit
size.
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\
/\/\/ (e-mail address removed) www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/