Skip to content

Commit 6a85b33

Browse files
authored
Merge pull request #225 from JuliaMath/vs/strict_assign
Restore STRICT_ASSIGN on FreeBSD as suggested in #215
2 parents 2d10c90 + 40dac9d commit 6a85b33

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/math_private.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,9 @@ do { \
203203
} while (0)
204204

205205

206-
//VBS
206+
#ifndef __FreeBSD__
207207
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
208-
209-
/* VBS
208+
#else
210209
#ifdef FLT_EVAL_METHOD
211210
// Attempt to get strict C99 semantics for assignment with non-C99 compilers.
212211
#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
@@ -215,7 +214,7 @@ do { \
215214
#define STRICT_ASSIGN(type, lval, rval) do { \
216215
volatile type __lval; \
217216
\
218-
if (sizeof(type) >= sizeof(double)) \
217+
if (sizeof(type) >= sizeof(long double)) \
219218
(lval) = (rval); \
220219
else { \
221220
__lval = (rval); \
@@ -224,7 +223,7 @@ do { \
224223
} while (0)
225224
#endif
226225
#endif
227-
*/
226+
#endif
228227

229228
/*
230229
* Common routine to process the arguments to nan(), nanf(), and nanl().

0 commit comments

Comments
 (0)