Help with GCC, please

leonp at leonp at
Mon Aug 22 09:08:25 UTC 2005

Hello, all.

I ask for pardon, as the question is not on RTEMS proper, but on the 
May be somebody knows...:-(

I wrote:
unsigned char* cp;
if (cp[6] == (cp[0]+cp[1]+cp[2]+cp[3]+cp[4]+cp[5]))
The comparison never becomes equal, as the assembler code generates such 
commands that the result at the right side is unsigned long.


GCC is :
configured with: ../gcc-3.2.2/configure --build=i686-pc-linux-gnu 
--host=i686-pc-linux-gnu --target=powerpc-rtems --with-gnu-as --with-gnu-ld 
--with-newlib --verbose --with-system-zlib --disable-nls 
--enable-version-specific-runtime-libs --enable-threads=rtems 
--prefix=/opt/rtems --enable-languages=c,c++,ada
Thread model: rtems
gcc version 3.2.2 (OAR Corporation 

Many thanks for the explanation.

More information about the users mailing list