Mail Archives: djgpp/1997/08/18/12:49:32
Erik Max Francis wrote:
>
> Yes, which is pretty bizarre. Strangely enough, though, the guaranteed
> limitations on int short long are that short will be at least 16 _bits_
> and long will be at least 32 _bits_, independent of the number of bits in
> a char (ANSI C 5.2.4.2). Note also that you can't have architectures with
> _less_ than 8 bits from ANSI C.
>
I'm working with TI's family of floating point DSPs (xc30, xc40). One
reason for the performance is that all the data is the same size--chars,
ints, longs, singles, doubles, are all 32-bit. Chars are stored in the
8 LSBs, sign extended to 32 bits, if necessary. This means, of course
that additional work is required to ensure that any chars you wish to
display (admittedly, not a frequent problem) are in the displayable
range. Some number to string conversions need to be rethought, for
example.
--
Charles Krug, Jr.
- Raw text -