Fix linkage conflict with feraiseexcept

This commit is contained in:
Andreas Schwab 2011-10-18 10:37:56 +02:00
parent 99ce7b04ed
commit caa6c9d845
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2011-10-18 Andreas Schwab <schwab@redhat.com>
* sysdeps/x86_64/fpu/bits/fenv.h: Add C linkage markers.
(__feraiseexcept_renamed): Add __THROW.
(feraiseexcept): Add __THROW. Rename local variables to fix
namespace violations.
2011-10-17 Ulrich Drepper <drepper@gmail.com>
* sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Small optimization.

View File

@ -98,9 +98,11 @@ fenv_t;
#ifdef __OPTIMIZE__
__BEGIN_DECLS
/* Optimized versions. */
extern int __feraiseexcept_renamed (int) __asm__ ("feraiseexcept");
__extern_inline int feraiseexcept (int __excepts)
extern int __feraiseexcept_renamed (int) __THROW __asm__ ("feraiseexcept");
__extern_inline int feraiseexcept (int __excepts) __THROW
{
if (__builtin_constant_p (__excepts)
&& (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
@ -115,11 +117,11 @@ __extern_inline int feraiseexcept (int __excepts)
}
if ((FE_DIVBYZERO & __excepts) != 0)
{
float f = 1.0;
float g = 0.0;
float __f = 1.0;
float __g = 0.0;
__asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g));
(void) &f;
__asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
(void) &__f;
}
return 0;
@ -127,4 +129,6 @@ __extern_inline int feraiseexcept (int __excepts)
return __feraiseexcept_renamed (__excepts);
}
__END_DECLS
#endif