Re: set SHORT_TYPE_SIZE to 8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/11/15 13:45, htio2 wrote:
> but avr is setting its short and int to 8 bit ....
> 

The AVR is an 8-bit cpu, but "int" on the AVR is 16-bit (as is "short").
 There is an option "-mint8" to make "int" and "short" 8-bit on the AVR,
but it is not supported by the libraries and I believe has been
deprecated in the compiler itself.

Even if the cpu you are porting to is 8-bit, keep short and int at
16-bit.  That is the minimum required for standard C, and no one will
thank you for making a non-standard C port.  Of course, you should make
heavy use of uint8_t and int8_t in library codes and any other support
code if it is an 8-bit target, but keep short and int standard.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux