diff options
Diffstat (limited to 'modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch')
-rw-r--r-- | modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch b/modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch new file mode 100644 index 0000000000..a0417602d5 --- /dev/null +++ b/modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch @@ -0,0 +1,31 @@ +diff --git a/math_private.h b/math_private.h +--- a/math_private.h ++++ b/math_private.h +@@ -323,16 +323,27 @@ do { \ + if (sizeof(type) >= sizeof(long double)) \ + (lval) = (rval); \ + else { \ + __lval = (rval); \ + (lval) = __lval; \ + } \ + } while (0) + #endif ++#else ++#define STRICT_ASSIGN(type, lval, rval) do { \ ++ volatile type __lval; \ ++ \ ++ if (sizeof(type) >= sizeof(long double)) \ ++ (lval) = (rval); \ ++ else { \ ++ __lval = (rval); \ ++ (lval) = __lval; \ ++ } \ ++} while (0) + #endif /* FLT_EVAL_METHOD */ + + /* Support switching the mode to FP_PE if necessary. */ + #if defined(__i386__) && !defined(NO_FPSETPREC) + #define ENTERI() ENTERIT(long double) + #define ENTERIT(returntype) \ + returntype __retval; \ + fp_prec_t __oprec; \ |