Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
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

He keeps differentiating, flying off on a tangent.

Working...