------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-18 21:41 ------- This is not a bug as signbit just have to return a non zero value if it has the value passed has its sign bit set. So defining it this way: inline int mysignbit(float x) { union { float f; unsigned int i; } u; u.f = x; return u.i&0x80000000UL; }
Is also legal. The reason for the different is optimizing for size vs optimizing for speed. The definition you gave is faster but larger. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469