This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in egcs/libio/iostream.cc
- To: egcs-bugs at cygnus dot com
- Subject: Bug in egcs/libio/iostream.cc
- From: Fred Richardson <frichard at benzene dot bbn dot com>
- Date: Thu, 29 Jan 1998 19:08:40 -0500
- Reply-to: frichard at BBN dot COM
Hi-
I just stumbled upon this bug in iostream.cc: it looks like the "pad"
field of "struct printf_info" is not set correctly if glibc2 is being
used. The fix is quite simple:
Index: egcs/libio/iostream.cc
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libio/iostream.cc,v
retrieving revision 1.6
diff -c -p -r1.6 iostream.cc
*** iostream.cc 1997/10/03 17:14:02 1.6
--- iostream.cc 1998/01/30 00:05:38
*************** ostream& ostream::operator<<(double n)
*** 628,637 ****
left: (flags() & ios::left) != 0,
showsign: (flags() & ios::showpos) != 0,
group: 0,
- pad: fill()
#if defined __GLIBC__ && __GLIBC__ >= 2
! , extra: 0
#endif
};
const void *ptr = (const void *) &n;
if (__printf_fp (rdbuf(), &info, &ptr) < 0)
--- 628,637 ----
left: (flags() & ios::left) != 0,
showsign: (flags() & ios::showpos) != 0,
group: 0,
#if defined __GLIBC__ && __GLIBC__ >= 2
! extra: 0,
#endif
+ pad: fill()
};
const void *ptr = (const void *) &n;
if (__printf_fp (rdbuf(), &info, &ptr) < 0)