On Mon, Jul 14, 2008 at 08:39:50AM -0600, Weddington, Eric wrote: > > > I was just wondering whether it's theoretically possible to use a > > 24bit Integer, and whether there is certain reason why 24bit aren't > > supported. > > 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. > > But personally, I would like to see support added for 24-bit integer > types as the AVR port could really use 24-bit pointers for larger > devices (ATmega256x, avr6 architecture).
CodeWarrior for the 68HC12 uses 24 bit *far pointers. Perhaps gcc for HC12 does too? One of the funky things about *far in HC12 is that the bytes are not in the same order as one might expect if promoted to 32 bits. If one absolutely had to have 24 bit integers one could construct a 3 byte struct, or probably better yet a union of several structs. Would have to handle the math separately. typedef union { uint8_t a[3]; // array struct { uint16_t ab; uint8_t c; } big_little; struct { uint8_t a; uint16_t bc; } little_big; struct { uint8_t a, b, c; } byte; } MY24BITS; -- David Kelly N4HHE, [EMAIL PROTECTED] ======================================================================== Whom computers would destroy, they must first drive mad. _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list