public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: bkoz@gcc.gnu.org
To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	kenny.simpson@gs.com, nobody@gcc.gnu.org,
	theonetruekenny@yahoo.com
Subject: Re: libstdc++/3114: DR 129: ostream::seekp() does not report an error
Date: Mon, 11 Jun 2001 11:28:00 -0000	[thread overview]
Message-ID: <20010611182825.19405.qmail@sourceware.cygnus.com> (raw)

Synopsis: DR 129: ostream::seekp() does not report an error

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Jun 11 11:28:24 2001
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Mon Jun 11 11:28:24 2001
State-Changed-Why:
    I'm testing this patch
    
    Index: include/bits/istream.tcc
    ===================================================================
    RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/istream.tcc,v
    retrieving revision 1.15
    diff -c -p -r1.15 istream.tcc
    *** istream.tcc	2001/05/31 20:33:06	1.15
    --- istream.tcc	2001/06/11 18:27:26
    *************** namespace std 
    *** 959,965 ****
      	    {
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	      this->rdbuf()->pubseekpos(__pos, ios_base::in);
      #endif
      	    }
      	  catch(exception& __fail)
    --- 959,969 ----
      	    {
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	      pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in);
    ! 
    ! // 129. Need error indication from seekp() and seekg()
    ! 	      if (__err == pos_type(off_type(-1)))
    ! 		this->setstate(failbit);
      #endif
      	    }
      	  catch(exception& __fail)
    *************** namespace std 
    *** 987,993 ****
      	    {
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	      this->rdbuf()->pubseekoff(__off, __dir, ios_base::in);
      #endif
      	    }
      	  catch(exception& __fail)
    --- 991,1002 ----
      	    {
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	      pos_type __err = this->rdbuf()->pubseekoff(__off, __dir, 
    ! 							 ios_base::in);
    ! 
    ! // 129. Need error indication from seekp() and seekg()
    ! 	      if (__err == pos_type(off_type(-1)))
    ! 		this->setstate(failbit);
      #endif
      	    }
      	  catch(exception& __fail)
    Index: include/bits/ostream.tcc
    ===================================================================
    RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/ostream.tcc,v
    retrieving revision 1.11
    diff -c -p -r1.11 ostream.tcc
    *** ostream.tcc	2001/05/31 12:14:54	1.11
    --- ostream.tcc	2001/06/11 18:27:27
    *************** namespace std 
    *** 411,420 ****
            bool __testok = this->fail() != true;
            
            if (__testok)
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	this->rdbuf()->pubseekpos(__pos, ios_base::out);
      #endif
            return *this;
          }
      
    --- 411,426 ----
            bool __testok = this->fail() != true;
            
            if (__testok)
    + 	{
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	  pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out);
    ! 
    ! // 129. Need error indication from seekp() and seekg()
    ! 	  if (__err == pos_type(off_type(-1)))
    ! 	    this->setstate(failbit);
      #endif
    + 	}
            return *this;
          }
      
    *************** namespace std 
    *** 426,434 ****
            bool __testok = this->fail() != true;
            
            if (__testok)
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	this->rdbuf()->pubseekoff(__off, __d, ios_base::out);
      #endif
            return *this;
          }
    --- 432,446 ----
            bool __testok = this->fail() != true;
            
            if (__testok)
    + 	{
      #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
      // 136.  seekp, seekg setting wrong streams?
    ! 	  this->rdbuf()->pubseekoff(__off, __d, ios_base::out);
    ! 
    ! // 129. Need error indication from seekp() and seekg()
    ! 	  if (__err == pos_type(off_type(-1)))
    ! 	    this->setstate(failbit);
    ! 	}
      #endif
            return *this;
          }

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3114&database=gcc


             reply	other threads:[~2001-06-11 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 11:28 bkoz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-12 13:58 bkoz
2001-06-10 23:06 theonetruekenny

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=20010611182825.19405.qmail@sourceware.cygnus.com \
    --to=bkoz@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=kenny.simpson@gs.com \
    --cc=nobody@gcc.gnu.org \
    --cc=theonetruekenny@yahoo.com \
    /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: link
Be 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).