Mail Archives: cygwin/2000/06/15/16:07:03
> The latest net release of gcc seems to have a slight bug in the %e
> print format specifier. It prints garbage when you try to print a
> variable whose value is zero.
Try this and let me know if it works for you. If it does, I'll work
on getting it into newlib.
2000-06-15 DJ Delorie <dj AT cygnus DOT com>
* libc/stdio/vfprintf.c: pad 0.0 correctly with %e
Index: newlib/libc/stdio/vfprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vfprintf.c,v
retrieving revision 1.3
diff -p -3 -r1.3 vfprintf.c
*** vfprintf.c 2000/04/17 17:10:16 1.3
--- vfprintf.c 2000/06/15 20:04:53
*************** number: if ((dprec = prec) >= 0)
*** 824,830 ****
ox[0] = *cp++;
ox[1] = '.';
PRINT(ox, 2);
! if (_double || (flags & ALT) == 0) {
PRINT(cp, ndig-1);
} else /* 0.[0..] */
/* __dtoa irregularity */
--- 824,830 ----
ox[0] = *cp++;
ox[1] = '.';
PRINT(ox, 2);
! if (_double) {
PRINT(cp, ndig-1);
} else /* 0.[0..] */
/* __dtoa irregularity */
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -