Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×
Programming

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 ;
}

Slashdot Top Deals

"The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" -- The Firesign Theatre

Working...