Re: [Sdcc-user] Question about binary constant casting

2014-12-08 Thread 陳韋任
Hi Maarten, > I don't see why you assume BIT4 to be a signed char. I think it already is > an int. But yes, after ~ it will certainly be an int. I just guess that BIT4 is treated as signed char by looking into the source code below, -- SDCC.lex -- 0[bB]{B}+{IS}?

Re: [Sdcc-user] Question about binary constant casting

2014-12-04 Thread Maarten Brock
Hello Chen, I don't see why you assume BIT4 to be a signed char. I think it already is an int. But yes, after ~ it will certainly be an int. Maarten > Hi All, > > I have the following code below, with "default" signed char type. > > --- > #define BIT4 0b0001 > #define P