Slashdot is powered by your submissions, so send in your scoop

 



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

The opossum is a very sophisticated animal. It doesn't even get up until 5 or 6 PM.

Working...