]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/tile/math_private.h
Fix libm feraiseexcept namespace (bug 17723).
[thirdparty/glibc.git] / sysdeps / tile / math_private.h
CommitLineData
1353ed13
CM
1#ifndef _MATH_PRIVATE_H
2
a0bce338
CM
3/* Internally, we suppress any use of exception or rounding other
4 than what is supported by the hardware. This does mean that some
5 code will silently fail to report exceptions, set rounding mode
6 as expected, etc., but it allows math code to compile that otherwise
7 wouldn't (such as math/s_fma.c) and so is valuable.
8
9 We intentionally ignore the "exception" arguments of functions that
10 take an exception, since we can't even evaluate the argument
11 without causing a build failure. The extra level of statement
12 expression wrapping avoids "statement with no effect" warnings.
13 Since the callers don't check for errors anyway, we just claim
14 success in every case.
15
16 The overrides for libc_ functions must happen before we include
17 the generic math_private.h, and the overrides for regular
18 <fenv.h> functions must happen afterwards, to avoid clashing with
19 the declarations of those functions. */
20
21#define libc_fesetround(rnd) ({ 0; })
22#define libc_fetestexcept(exc) ({ 0; })
23#define libc_feholdexcept_setround(env, exc) ({ (void) (env); 0; })
24#define libc_feupdateenv_test(env, exc) ({ (void) (env); 0; })
25
ed7e7d46 26#include_next <math_private.h>
1353ed13 27
a0bce338 28#define feraiseexcept(excepts) ({ 0; })
0747f818 29#define __feraiseexcept(excepts) ({ 0; })
a0bce338 30#define feclearexcept(exc) ({ 0; })
cd2c37c9
CM
31#define fetestexcept(exc) ({ 0; })
32extern inline int fegetenv (fenv_t *__e) { return 0; }
33extern inline int fesetenv (const fenv_t *__e) { return 0; }
34extern inline int feupdateenv (const fenv_t *__e) { return 0; }
35extern inline int fegetround (void) { return FE_TONEAREST; }
36extern inline int fesetround (int __d) { return 0; }
1353ed13
CM
37
38#endif