summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
blob: 9f834149c623821326f926b142b71f57593618c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/math_private.h b/math_private.h
--- a/math_private.h
+++ b/math_private.h
@@ -309,17 +309,17 @@ do {								\
 /* The above works on non-i386 too, but we use this to check v. */
 #define	LD80C(m, ex, v)	{ .e = (v), }
 #endif
 
 #ifdef FLT_EVAL_METHOD
 /*
  * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
  */
-#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
 #define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
 #else
 #define	STRICT_ASSIGN(type, lval, rval) do {	\
 	volatile type __lval;			\
 						\
 	if (sizeof(type) >= sizeof(long double))	\
 		(lval) = (rval);		\
 	else {					\