Submission + - gcc says -10==10 (lkml.org) 6
An anonymous reader writes: A bug in gcc causes it to think -10*abs(x) and 10*abs(x) have the same value. Just compile the following small program:
int main( void )
{
int i=2;
if( -10*abs (i-1) == 10*abs(i-1) )
printf ("OMG,-10==10 in linux!\n");
else
printf ("nothing special here\n") ;
return 0 ;
}
int main( void )
{
int i=2;
if( -10*abs (i-1) == 10*abs(i-1) )
printf ("OMG,-10==10 in linux!\n");
else
printf ("nothing special here\n") ;
return 0 ;
}