Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcsun!hp4nl!tuegate.tue.nl!al.ele.tue.nl!pim From: pim@ele.tue.nl (Pim Buurman) Newsgroups: comp.sys.alliant Subject: Unsigned comparison in FX/C. Message-ID: <489@al.ele.tue.nl> Date: 2 May 90 12:09:27 GMT Sender: pim@ele.tue.nl (Pim Buurman) Organization: Eindhoven University of Technology, The Netherlands Lines: 27 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).