Marek,

I have run into a problem with this warning and building glibc.

sysdeps/ieee754/s_matherr.c has:

int
weak_function
__matherr(struct exception *x)
{
        int n=0;
        if(x->arg1!=x->arg1) return 0;
        return n;
}


And arg1 is a floating point type.  I think that if the value of
x->xarg1 is a NaN then the if statement should return TRUE because a NaN
never compares equal to anything, even another NaN (check with your
local IEEE expert).  I believe this method of checking for a NaN is
fairly common and I am not sure if GCC should be emitting a warning for
it.

Steve Ellcey
sell...@imgtec.com

Reply via email to