From mboxrd@z Thu Jan 1 00:00:00 1970 From: Craig Rodrigues To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/4545 basic_ostream op<< should set badbit, not failbit Date: Sun, 14 Oct 2001 12:36:00 -0000 Message-id: <20011014193602.25867.qmail@sourceware.cygnus.com> X-SW-Source: 2001-10/msg00291.html List-Id: The following reply was made to PR libstdc++/4545; it has been noted by GNATS. From: Craig Rodrigues To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, gcc-gnats@gcc.gnu.org, brendan@zen.org, rodrigc@gcc.gnu.org Subject: Re: libstdc++/4545 basic_ostream op<< should set badbit, not failbit Date: Sun, 14 Oct 2001 15:29:12 -0400 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4545&database=gcc Hi, Following patch addresses PR 4545 on mainline. "I was mistaken in one piece that I submitted in PR libstdc++/4536. Rather, according to $27.6.2.5.3(6) the operator basic_ostream::operator<<(streambuf*) should tset badbit, not failbit, if __sbin or __xtrct is set to 0." 2001-08-02 Brendan Kehoe * include/bits/ostream.tcc (basic_ostream::op<<(streambuf*)): If __sbin or __xtrct are 0, set badbit, not failbit, per $27.6.2.5.3(6). *** bits/ostream.tcc.~1~ Wed Jul 18 19:19:42 2001 --- bits/ostream.tcc Thu Oct 11 14:59:02 2001 *************** namespace std *** 347,351 **** __xtrct = __copy_streambufs(*this, __sbin, __sbout); if (!__sbin || !__xtrct) ! this->setstate(ios_base::failbit); return *this; } --- 347,351 ---- __xtrct = __copy_streambufs(*this, __sbin, __sbout); if (!__sbin || !__xtrct) ! this->setstate(ios_base::badbit); return *this; } -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@mediaone.net