For a PDP-8, CHAR_BIT would be 12, int could have 24 bits, and long could have 36 or 48, whatever is most convenient/efficient/desired.
For a PDP-15, char and int could be the same 18-bit type, and long could be 36 bits. On further reflection, you might be able to replace the standard 16 bit int on AVR with a 24 bit int. The required ranges are minimums. That makes int16_t a special type outside the normal hierarchy, however, and I'm not certain that's allowed. Regards, -=Dave ________________________________ From: [EMAIL PROTECTED] [...] what about a PDP 8 or PDP 15, could we not code for it? being 12 and 18 bit machines? From: [EMAIL PROTECTED] > 2008/7/14 Weddington, Eric <[EMAIL PROTECTED]>: >> A 24-bit integer is not supported by the C language. In theory, support >> could be added to GCC, but then it would be considered an extension to >> the C language. And it would also be difficult and/or time-consuming to >> add to GCC. > > The C standard doesn't dictate the size of any integer type, except that char > must be large enough to hold the environments standard character set and > the size of any larger types is ordered as you'd expect. > char <= short <= int <= long Also that short and int must be able to represent at least -32767 to +32767, and long must be able to represent +/-2,147,483,647. So int24_t would have to be a special type outside the standard types. And I think (though I'm not certain) that it would have to be promoted to long before any operator could be applied. Some of that would be mitigated by the as-if rule, of course... > int is typically the natural word size for the architecture, but often on 8 > bit > micros it will be larger (since char typically provides an 8 bit int anyway.) It's larger because an 8 bits can't represent the required range of values. Regards, -=Dave ________________________________ Time for vacation? WIN what you need. Enter Now! _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list _________________________________________________________________ With Windows Live for mobile, your contacts travel with you. http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008 _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list