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