Re: [Mspgcc-users] int uint bug

2003-12-15 Thread Matthias Weingart
On Mon, Dec 15, 2003 at 10:52:27PM +0300, Dmitry wrote: > I think it's been fixed ages ado... can't remember when... > however, conversion from unsigned to signed may result in negative value of > destination if MSB of source is set in 1. Ok, when I have my linux machine running I will check it a

Re: [Mspgcc-users] int uint bug

2003-12-15 Thread Dmitry
I think it's been fixed ages ado... can't remember when... however, conversion from unsigned to signed may result in negative value of destination if MSB of source is set in 1. ~d On Monday 15 December 2003 22:46, Matthias Weingart wrote: > Hi Dimitry, > > run the software below and at the end

[Mspgcc-users] int uint bug

2003-12-15 Thread Matthias Weingart
Hi Dimitry, run the software below and at the end you get x=1 (should be 0!!) It seems that gcc uses the flags of sub for the next if(); but it should do a additional cmp !! (first it is a unsigned operation, then a signed) msp430-gcc main.c -mmcu=msp430x149 -g -O2 -ffunction-sections -Wl,--gc-