__typeof__ (const int)

Liu Hao lh_mouse@126.com
Thu Feb 16 14:39:00 GMT 2017


On 2017/2/16 21:56, Aurelien Buhrig wrote:
> Yes indeed, the private target has HI int.
> The pb is that both -32768 (0x8000) and 32767 should fit into an int (an
> int16_t actually), and the newlib <stdlib.h> defines INT16_MIN as -32768 .
> This makes gcc.gd/stdint-x.h fail...
>
> The first tree dumps show SI const/type instead of HI. Is it the parser
> which computes the type?
If you are sure your target uses 2's complement and `int` is 16 bits 
then the definition is probably a bug and you can fix it by changing the 
definition to

     #define INT16_MIN  (-32767-1)

-- 
Best regards,
LH_Mouse



More information about the Gcc-help mailing list