summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pp_pack.c b/pp_pack.c
index be9b11580b..5229fc345e 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -3184,7 +3184,12 @@ extern const double _double_constants[];
Zero(&anv, 1, NV); /* can be long double with unused bits */
while (len-- > 0) {
fromstr = NEXTFROM;
+#ifdef __GNUC__
+ /* to work round a gcc/x86 bug; don't use SvNV */
+ anv.nv = sv_2nv(fromstr);
+#else
anv.nv = SvNV(fromstr);
+#endif
DO_BO_PACK_N(anv, NV);
PUSH_BYTES(utf8, cur, anv.bytes, sizeof(anv.bytes));
}
@@ -3197,7 +3202,12 @@ extern const double _double_constants[];
Zero(&aldouble, 1, long double);
while (len-- > 0) {
fromstr = NEXTFROM;
+# ifdef __GNUC__
+ /* to work round a gcc/x86 bug; don't use SvNV */
+ aldouble.ld = (long double)sv_2nv(fromstr);
+# else
aldouble.ld = (long double)SvNV(fromstr);
+# endif
DO_BO_PACK_N(aldouble, long double);
PUSH_BYTES(utf8, cur, aldouble.bytes, sizeof(aldouble.bytes));
}