Merge pull request #225 from JuliaMath/vs/strict_assign

Restore STRICT_ASSIGN on FreeBSD as suggested in #215
This commit is contained in:
Viral B. Shah 2021-02-06 18:09:23 -05:00 committed by GitHub
commit 6a85b33182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -203,10 +203,9 @@ do { \
} while (0)
//VBS
#ifndef __FreeBSD__
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
/* VBS
#else
#ifdef FLT_EVAL_METHOD
// Attempt to get strict C99 semantics for assignment with non-C99 compilers.
#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
@ -215,7 +214,7 @@ do { \
#define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __lval; \
\
if (sizeof(type) >= sizeof(double)) \
if (sizeof(type) >= sizeof(long double)) \
(lval) = (rval); \
else { \
__lval = (rval); \
@ -224,7 +223,7 @@ do { \
} while (0)
#endif
#endif
*/
#endif
/*
* Common routine to process the arguments to nan(), nanf(), and nanl().