From: Ulrich Drepper Date: Sun, 13 Jun 1999 15:19:13 +0000 (+0000) Subject: Disable signbit* inline functions for gcc <= 2.7.x. X-Git-Tag: cvs/glibc_2-1-2~402 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0492b4accd62c20f0f2d0ad772ce0024c1d0d6c;p=thirdparty%2Fglibc.git Disable signbit* inline functions for gcc <= 2.7.x. Add __extension__ to signbit definitions to calm down gcc. --- diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h index 463d481ce7f..8fb22d48d2e 100644 --- a/sysdeps/i386/fpu/bits/mathinline.h +++ b/sysdeps/i386/fpu/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for i387. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by John C. Bowman , 1995. @@ -110,23 +110,29 @@ __result; }) # endif /* __i686__ */ +/* The gcc, version 2.7 or below, has problems with all this inlining + code. So disable it for this version of the compiler. */ +# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)) /* Test for negative number. Used in the signbit() macro. */ __MATH_INLINE int __signbitf (float __x) { - union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; } __MATH_INLINE int __signbit (double __x) { - union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[1] < 0; + __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; + return __u.__i[1] < 0; } __MATH_INLINE int __signbitl (long double __x) { - union { long double __l; int __i[3]; } __u = { __l: __x }; + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; return (__u.__i[2] & 0x8000) != 0; } +# endif #endif