Fix for g++ and math.h on SPARC
Thorsten Kukuk
kukuk@suse.de
Fri May 3 05:11:00 GMT 2002
On Fri, May 03, Thorsten Kukuk wrote:
>
> Hi,
>
> If I try to compile C++ code, which includes "math.h",
> with "g++ -pedantic" on SPARC it aborts always with:
>
> /usr/include/bits/mathinline.h:216: declaration of `double fdim(double, double)
> ' throws different exceptions
> /usr/include/bits/mathcalls.h:313: than previous declaration `double
> fdim(double, double) throw ()'
> /usr/include/bits/mathinline.h:223: declaration of `float fdimf(float, float)'
> throws different exceptions
> /usr/include/bits/mathcalls.h:313: than previous declaration `float
> fdimf(float, float) throw ()'
The append patch fixes the problem for me.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Deutschherrnstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
-------------- next part --------------
2002-05-03 Thorsten Kukuk <kukuk@suse.de>
* sysdeps/sparc/fpu/bits/mathinline.h: Add __THROW to fdim and fdimf
declarations.
--- sysdeps/sparc/fpu/bits/mathinline.h
+++ sysdeps/sparc/fpu/bits/mathinline.h 2002/05/03 12:08:13
@@ -213,16 +213,16 @@
# ifndef __NO_MATH_INLINES
-__MATH_INLINE double fdim (double __x, double __y);
+__MATH_INLINE double fdim (double __x, double __y) __THROW;
__MATH_INLINE double
-fdim (double __x, double __y)
+fdim (double __x, double __y) __THROW
{
return __x < __y ? 0 : __x - __y;
}
-__MATH_INLINE float fdimf (float __x, float __y);
+__MATH_INLINE float fdimf (float __x, float __y) __THROW;
__MATH_INLINE float
-fdimf (float __x, float __y)
+fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0 : __x - __y;
}
More information about the Libc-alpha
mailing list