提交 6d3f1a39 编写于 作者: S Szabolcs Nagy

math: turn off the STRICT_ASSIGN workaround by default

the volatile hack in STRICT_ASSIGN is only needed if
assignment is not respected and excess precision is kept.
gcc -fexcess-precision=standard and -ffloat-store both
respect assignment and musl use these flags by default.
i kept the macro for now so the workaround may be used
for bad compilers in the future.
上级 033a9d6a
...@@ -157,16 +157,14 @@ long double __tanl(long double, long double, int); ...@@ -157,16 +157,14 @@ long double __tanl(long double, long double, int);
long double __polevll(long double, const long double *, int); long double __polevll(long double, const long double *, int);
long double __p1evll(long double, const long double *, int); long double __p1evll(long double, const long double *, int);
// FIXME: not needed when -fexcess-precision=standard is supported (>=gcc4.5) #if 0
/* /* Attempt to get strict C99 semantics for assignment with non-C99 compilers. */
* Attempt to get strict C99 semantics for assignment with non-C99 compilers.
*/
#if 1
#define STRICT_ASSIGN(type, lval, rval) do { \ #define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __v = (rval); \ volatile type __v = (rval); \
(lval) = __v; \ (lval) = __v; \
} while (0) } while (0)
#else #else
/* Should work with -fexcess-precision=standard (>=gcc-4.5) or -ffloat-store */
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval)) #define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval))
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册