public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: brendan@zen.org To: gcc-gnats@gcc.gnu.org Subject: libstdc++/4536: ostream seekp & istream seekg should scope failbit Date: Thu, 11 Oct 2001 06:56:00 -0000 [thread overview] Message-ID: <20011011134829.17463.qmail@sourceware.cygnus.com> (raw) >Number: 4536 >Category: libstdc++ >Synopsis: ostream seekp & istream seekg should scope failbit >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Oct 11 06:56:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Brendan Kehoe >Release: CVS tree >Organization: >Environment: >Description: ostream's seekp and istream's seekg methods need to use failbit as `ios_base::failbit'. It may be worth noting that the setting of failbit goes in line with the change for library DR #129. The standard pre-DR edits does not include the clause in $27.6.2.4(2) regarding the setting of failbit. >How-To-Repeat: >Fix: See attached patch. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="diffs-istream-1.txt" Content-Disposition: inline; filename="diffs-istream-1.txt" 2001-10-11 Brendan Kehoe <brendan@zen.org> * bits/ostream.tcc (seekp): Scope use as ios_base::failbit. * bits/istream.tcc (seekg): Likewise. Index: include/bits/ostream.tcc =================================================================== RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/ostream.tcc,v retrieving revision 1.15 diff -u -p -r1.15 ostream.tcc --- ostream.tcc 2001/09/25 23:51:17 1.15 +++ ostream.tcc 2001/10/10 11:44:23 @@ -346,7 +346,7 @@ namespace std if (__sbin && __cerb) __xtrct = __copy_streambufs(*this, __sbin, __sbout); if (!__sbin || !__xtrct) - this->setstate(ios_base::failbit); + this->setstate(ios_base::failbit); return *this; } Index: include/bits/istream.tcc =================================================================== RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/istream.tcc,v retrieving revision 1.19 diff -u -p -r1.19 istream.tcc --- istream.tcc 2001/09/25 23:51:17 1.19 +++ istream.tcc 2001/10/10 11:44:13 @@ -963,7 +963,7 @@ namespace std // 129. Need error indication from seekp() and seekg() if (__err == pos_type(off_type(-1))) - this->setstate(failbit); + this->setstate(ios_base::failbit); #endif } catch(exception& __fail) @@ -996,7 +996,7 @@ namespace std // 129. Need error indication from seekp() and seekg() if (__err == pos_type(off_type(-1))) - this->setstate(failbit); + this->setstate(ios_base::failbit); #endif } catch(exception& __fail)
next reply other threads:[~2001-10-11 6:56 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-11 6:56 brendan [this message] 2001-10-14 12:36 libstdc++/4536 " Craig Rodrigues 2001-10-25 21:49 libstdc++/4536: " bkoz 2001-11-04 3:33 bkoz 2001-11-04 7:36 bkoz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011011134829.17463.qmail@sourceware.cygnus.com \ --to=brendan@zen.org \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).