Help with GCC, please

leonp at plris.com leonp at plris.com
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 
rtems-GCC.
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.

Why?

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 
gcc-3.2.2-20030326/newlib-1.11.0-20030326-2)

Many thanks for the explanation.
-- 
Leon



More information about the users mailing list