pim@ele.tue.nl (Pim Buurman) (05/02/90)
I discovered today a bug in the FX/C compiler, V2.1.23 .
It seems that (unsigned int) 0 < (unsigned int) 0 yields TRUE !!
Try this program and see what happens.
main()
{
unsigned int ar[20];
unsigned int i, j, swap;
for (i = 1; i < 10; i++ ) {
for (j = 0; j < i/2; j++ ) {
if ( j > 12 )
break; /* To stop sometime */
swap = ar[j];
ar[j] = ar[i-j-1];
ar[i-j-1] = swap;
printf( "%d %d\n", i, j );
}
}
}
If someone can confirm this error, would he mail me the result ?
Thanks, Pim.
Pim Buurman. pim@ele.tue.nl
Eindhoven Univ. of Tech., Design Automation Section (ES).