1 #ifndef NIO2_MATH_PRIVATE_H
2 #define NIO2_MATH_PRIVATE_H 1
4 /* Suppress use of exceptions here to avoid build errors if the FE_*
5 macros aren't defined. Only allow rounding modes implemented for Nios II.
7 This does mean that some code will silently fail to report exceptions,
8 set rounding mode as expected, etc., but it allows math code to compile
9 that otherwise wouldn't (such as math/s_fma.c) and so is valuable.
11 We intentionally ignore the "exception" arguments of functions that
12 take an exception, since we can't even evaluate the argument
13 without causing a build failure. The extra level of statement
14 expression wrapping avoids "statement with no effect" warnings.
15 Since the callers don't check for errors anyway, we just claim
16 success in every case.
18 The overrides for libc_ functions must happen before we include
19 the generic math_private.h, and the overrides for regular
20 <fenv.h> functions must happen afterwards, to avoid clashing with
21 the declarations of those functions. */
23 #define libc_fesetround(rnd) ({ 0; })
24 #define libc_fetestexcept(exc) ({ 0; })
25 #define libc_feholdexcept_setround(env, exc) ({ (void) (env); 0; })
26 #define libc_feupdateenv_test(env, exc) ({ (void) (env); 0; })
28 /* Enable __finitel, __isinfl, and __isnanl for binary compatibility
29 when built without long double support. */
30 #define LDBL_CLASSIFY_COMPAT 1
32 #include_next <math_private.h>
34 #define feraiseexcept(excepts) ({ 0; })
35 #define __feraiseexcept(excepts) ({ 0; })
36 #define feclearexcept(exc) ({ 0; })