2018-02-01 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0]
+ (feraiseexcept): New macro.
+ [FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise.
+ * sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept):
+ Remove macro.
+ (__feraiseexcept): Likewise.
+ (feclearexcept): Likewise.
+ * sysdeps/microblaze/math_private.h (feraiseexcept): Likewise.
+ (__feraiseexcept): Likewise.
+ (feclearexcept): Likewise.
+ * sysdeps/nios2/math_private.h (feraiseexcept): Likewise.
+ (__feraiseexcept): Likewise.
+ (feclearexcept): Likewise.
+ * sysdeps/tile/math_private.h (feraiseexcept): Likewise.
+ (__feraiseexcept): Likewise.
+ (feclearexcept): Likewise.
+ (fetestexcept): Likewise.
+
* sysdeps/m68k/coldfire/math-tests.h: New file.
* sysdeps/m68k/fpu/bits/fenv.h: Move to ....
SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_53bit, \
libc_feresetround_53bit)
+/* When no floating-point exceptions are defined in <fenv.h>, make
+ feraiseexcept ignore its argument so that unconditional
+ feraiseexcept calls do not cause errors for undefined exceptions.
+ Define it to expand to a void expression so that any calls testing
+ the result of feraiseexcept do produce errors. */
+#if FE_ALL_EXCEPT == 0
+# define feraiseexcept(excepts) ((void) 0)
+# define __feraiseexcept(excepts) ((void) 0)
+#endif
+
#endif /* _MATH_PRIVATE_H_ */
success in every case.
The overrides for libc_ functions must happen before we include
- the generic math_private.h, and the overrides for regular
- <fenv.h> functions must happen afterwards, to avoid clashing with
- the declarations of those functions. */
+ the generic math_private.h. */
#define libc_fesetround(rnd) ({ 0; })
#define libc_fetestexcept(exc) ({ 0; })
#include_next <math_private.h>
-#define feraiseexcept(excepts) ({ 0; })
-#define __feraiseexcept(excepts) ({ 0; })
-#define feclearexcept(exc) ({ 0; })
-
#endif
success in every case.
The overrides for libc_ functions must happen before we include
- the generic math_private.h, and the overrides for regular
- <fenv.h> functions must happen afterwards, to avoid clashing with
- the declarations of those functions. */
+ the generic math_private.h. */
#define libc_fesetround(rnd) ({ 0; })
#define libc_fetestexcept(exc) ({ 0; })
#include_next <math_private.h>
-#define feraiseexcept(excepts) ({ 0; })
-#define __feraiseexcept(excepts) ({ 0; })
-#define feclearexcept(exc) ({ 0; })
-
#endif
success in every case.
The overrides for libc_ functions must happen before we include
- the generic math_private.h, and the overrides for regular
- <fenv.h> functions must happen afterwards, to avoid clashing with
- the declarations of those functions. */
+ the generic math_private.h. */
#define libc_fesetround(rnd) ({ 0; })
#define libc_fetestexcept(exc) ({ 0; })
#include_next <math_private.h>
-#define feraiseexcept(excepts) ({ 0; })
-#define __feraiseexcept(excepts) ({ 0; })
-#define feclearexcept(exc) ({ 0; })
-
#endif
#include_next <math_private.h>
-#define feraiseexcept(excepts) ({ 0; })
-#define __feraiseexcept(excepts) ({ 0; })
-#define feclearexcept(exc) ({ 0; })
-#define fetestexcept(exc) ({ 0; })
extern inline int fegetenv (fenv_t *__e) { return 0; }
extern inline int __fegetenv (fenv_t *__e) { return 0; }
extern inline int fesetenv (const fenv_t *__e) { return 0; }