ISO C requires: (1) "char" have at least 8 bits. (2) sizeof(char) == 1. (3) "int" be able to hold at least -32767..32767. (4) "long" be able to hold at least -2147483647..2147483647. (5) "int" be no bigger than "long". There are other requirements, but these are the relevant ones. John Payson writes: > I personally find it offensive that most C compilers for the PIC > (the only exception I know of is HiTech's) regard "int" as an 8-bit > type and "long" as a 16-bit type. Both of these definitions are > clearly contrary to the C standard Correct; rule (4) is violated, "long" is not big enough. > (nb: a compiler I use on a different chip has both "char" and "int" > as 16-bit types, and sizeof(char)==1, but _that_ is _allowable_ by > the C standard). Correct. Martin Green writes: > A 16 bit int is not part of the C standard. An int that can represent -32767..32767 *is* part of the C standard. Philip Restuccia writes: > As someone else has already pointed out, the "C standard" does NOT > define any particular sizes for ANY integral data types; they are > platform-dependent. K&R C did not define particular (minimum) sizes, but ANSI/ISO C does. Argh! I see John Payson has followed up with an even more exhaustive listing of the ANSI/ISO C requirements. He covered them perfectly. An excellent source book is Harbison & Steele's _C: A Reference Manual_. I worked on a C compiler on an unusual platform, and having the actual rules (rather than the assumptions I'd carried around with me from working on normal platforms) was a tremendous help. Brian