summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2012-11-13 19:59:02 +0100
committerSzabolcs Nagy <nsz@port70.net>2012-11-13 19:59:02 +0100
commit6d3f1a39c14b12026df84f386875b094e3652990 (patch)
tree9b8be9aa969d3cd94173d614edf7fed2111c10df /src/internal
parent033a9d6ad2a65ac03156b179e7c6101d2e72c4c0 (diff)
downloadmusl-6d3f1a39c14b12026df84f386875b094e3652990.tar.gz
musl-6d3f1a39c14b12026df84f386875b094e3652990.tar.bz2
musl-6d3f1a39c14b12026df84f386875b094e3652990.tar.xz
musl-6d3f1a39c14b12026df84f386875b094e3652990.zip
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.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/libm.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/internal/libm.h b/src/internal/libm.h
index dfecd836..46c4b564 100644
--- a/src/internal/libm.h
+++ b/src/internal/libm.h
@@ -157,16 +157,14 @@ long double __tanl(long double, long double, int);
long double __polevll(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)
-/*
- * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
- */
-#if 1
+#if 0
+/* Attempt to get strict C99 semantics for assignment with non-C99 compilers. */
#define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __v = (rval); \
(lval) = __v; \
} while (0)
#else
+/* Should work with -fexcess-precision=standard (>=gcc-4.5) or -ffloat-store */
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval))
#endif