public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Simpson, Kenny" <Kenny.Simpson@gs.com>
To: bkoz@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: RE: libstdc++/2832
Date: Wed, 23 May 2001 07:36:00 -0000	[thread overview]
Message-ID: <20010523143600.19958.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR libstdc++/2832; it has been noted by GNATS.

From: "Simpson, Kenny" <Kenny.Simpson@gs.com>
To: "'bkoz@gcc.gnu.org'" <bkoz@gcc.gnu.org>, gcc-gnats@gcc.gnu.org,
	Kenny.Simpson@gs.com, nobody@gcc.gnu.org, theonetruekenny@yahoo.com
Cc:  
Subject: RE: libstdc++/2832
Date: Wed, 23 May 2001 10:32:05 -0400

 I don't have a copy of the Standard in front of me, but I do have
 _Standard C++ IOStreams and Locales_ by Langer and Kreft.
 
 p72 starts with:
 "rdbuf() SUBTLETIES
 Note the subtle difference between a concrete stream class's rdbuf()
 function and the
 inherited version of rdbuf(): The inherited rdbuf() function
 basic_ios<charT,
 traits>::rdbuf() returns the pointer to the stream buffer that is maintained
 by the
 base class.  The concrete stream class's rdbuf() function returns a pointer
 to its contained
 stream buffer object."
 
 It goes on to include a simple example similar to the one I submitted with
 the report:
 "
 basic_filebuf<char> buf;
 buf.open("in.txt");
 
 basic_ifstream<char> ifstr;          // ifstr by default contains a file
 buffer object
 ifstr.basic_ios<char>::rdbuf(&buf);  // here the file buffer pointer is
 replaced using the
                                      // hidden base class version of the
 rdbuf() function
 
 basic_streambuf<char>* bp;
 bp = ifstr.rdbuf();                  // redefined rdbuf() returns pointer to
 contained, but
                                      // unused buffer
 bp = ifstr.basic_ios<char>::rdbuf(); // base class version of rdbuf()
 function returns
                                      // pointer to newly assigned and
 actually used file buffer.
 "
 
 -Kenny
 
 -----Original Message-----
 From: bkoz@gcc.gnu.org [ mailto:bkoz@gcc.gnu.org ]
 Sent: Tuesday, May 22, 2001 8:28 PM
 To: bkoz@gcc.gnu.org; gcc-gnats@gcc.gnu.org; Kenny.Simpson@gs.com;
 nobody@gcc.gnu.org; theonetruekenny@yahoo.com
 Subject: Re: libstdc++/2832
 
 
 Synopsis: rdbuf methods incorrect
 
 Responsible-Changed-From-To: unassigned->bkoz
 Responsible-Changed-By: bkoz
 Responsible-Changed-When: Tue May 22 17:27:50 2001
 Responsible-Changed-Why:
     Responsible
 State-Changed-From-To: open->analyzed
 State-Changed-By: bkoz
 State-Changed-When: Tue May 22 17:27:50 2001
 State-Changed-Why:
     This seems to be two bugs:
     
     1) pointers returned by rdbuf() not the same
     
     2) [io]stringstream/[io]fstream dtors delete streambuf object.
     
     
     I don't see where, in the standard #1 is guaranteed. Perhaps you can
 point this out to me/
     
     I do agree that #2 is a problem, and am working on a fix now.
     
     thanks,
     benjamin
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2832&database=gcc


             reply	other threads:[~2001-05-23  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-23  7:36 Simpson, Kenny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-26  2:26 libstdc++/2832 bkoz
2001-05-24 16:06 libstdc++/2832 bkoz
2001-05-23 11:16 libstdc++/2832 Simpson, Kenny
2001-05-22 17:36 libstdc++/2832 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=20010523143600.19958.qmail@sourceware.cygnus.com \
    --to=kenny.simpson@gs.com \
    --cc=bkoz@gcc.gnu.org \
    --cc=gcc-prs@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: 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).