diff options
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index c10fed8e9..c51b6b821 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1260,7 +1260,11 @@ _DEFUN(cvt, (data, value, ndigits, flags, sign, decpt, ch, length), #ifdef _NO_LONGDBL union double_union tmp; #else - struct ldieee *ldptr; + union + { + struct ldieee ieee; + _LONG_DOUBLE val; + } ld; #endif if (ch == 'f') { @@ -1287,8 +1291,8 @@ _DEFUN(cvt, (data, value, ndigits, flags, sign, decpt, ch, length), digits = _dtoa_r (data, value, mode, ndigits, decpt, &dsgn, &rve); #else /* !_NO_LONGDBL */ - ldptr = (struct ldieee *)&value; - if (ldptr->sign) { /* this will check for < 0 and -0.0 */ + ld.val = value; + if (ld.ieee.sign) { /* this will check for < 0 and -0.0 */ value = -value; *sign = '-'; } else |