summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/patches/13_define_strict_assign_even_if_flt_eval_method_is_not_defined.patch
blob: a0417602d58d3e193f70cfdd185458c65f10076b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;			\