mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 1303463 - Use safer STRICT_ASSIGN on VisualStudio. r=jwalden
This commit is contained in:
parent
fcdff1b513
commit
a96c9fd437
@ -0,0 +1,23 @@
|
||||
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
||||
--- a/modules/fdlibm/src/math_private.h
|
||||
+++ b/modules/fdlibm/src/math_private.h
|
||||
@@ -271,17 +271,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 { \
|
||||
|
@ -276,7 +276,7 @@ do { \
|
||||
/*
|
||||
* 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 { \
|
||||
|
Loading…
Reference in New Issue
Block a user