public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/2832
@ 2001-05-26 2:26 bkoz
0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2001-05-26 2:26 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
The following reply was made to PR libstdc++/2832; it has been noted by GNATS.
From: bkoz@gcc.gnu.org
To: bkoz@gcc.gnu.org, gcc-gnats@gcc.gnu.org, kenny.simpson@gs.com,
theonetruekenny@yahoo.com
Cc:
Subject: Re: libstdc++/2832
Date: 26 May 2001 09:21:32 -0000
Synopsis: rdbuf methods incorrect
State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Sat May 26 02:21:32 2001
State-Changed-Why:
Per request.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2832&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++/2832
@ 2001-05-24 16:06 bkoz
0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2001-05-24 16:06 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
The following reply was made to PR libstdc++/2832; it has been noted by GNATS.
From: bkoz@gcc.gnu.org
To: bkoz@gcc.gnu.org, gcc-gnats@gcc.gnu.org, kenny.simpson@gs.com,
theonetruekenny@yahoo.com
Cc:
Subject: Re: libstdc++/2832
Date: 24 May 2001 23:05:54 -0000
Synopsis: rdbuf methods incorrect
State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Thu May 24 16:05:54 2001
State-Changed-Why:
Hi. I agree with your analysis, and have made the requisite changes in the iostreams code. Here's the patch:
http://gcc.gnu.org/ml/gcc-patches/2001-05/msg01761.html
Can you please verify that this solves your problem? I'll be checking it in to both trunk and branch in a few minutes.
thanks again,
benjamin
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2832&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: libstdc++/2832
@ 2001-05-23 11:16 Simpson, Kenny
0 siblings, 0 replies; 5+ messages in thread
From: Simpson, Kenny @ 2001-05-23 11:16 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
The following reply was made to PR libstdc++/2832; it has been noted by GNATS.
From: "Simpson, Kenny" <Kenny.Simpson@gs.com>
To: "'Simpson, Kenny'" <Kenny.Simpson@gs.com>,
"'bkoz@gcc.gnu.org'" <bkoz@gcc.gnu.org>, gcc-gnats@gcc.gnu.org,
nobody@gcc.gnu.org, theonetruekenny@yahoo.com
Cc:
Subject: RE: libstdc++/2832
Date: Wed, 23 May 2001 14:13:05 -0400
Also, from the 1997 Draft at
http://anubis.dkuug.dk/jtc1/sc22/open/n2356/lib-iostreams.html#lib.ostringst
ream.members
It claims that ostringstream::rdbuf() is never NULL because it ALWAYS
returns the private buffer.
But, from
http://anubis.dkuug.dk/jtc1/sc22/open/n2356/lib-iostreams.html#lib.basic.ios
.members
It states that
basic_streambuf<charT,traits>* basic_ios::rdbuf(
basic_streambuf<charT,traits>* sb );
has the post condition that sb == basic_ios::rdbuf()
So, clearly basic_ios::rdbuf() and ostringstream::rdbuf() must be different.
Also note that the iostreams implementation as shipped with 2.95.2 handles
this correctly,
so this should be considered a regression.
-Kenny
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: libstdc++/2832
@ 2001-05-23 7:36 Simpson, Kenny
0 siblings, 0 replies; 5+ messages in thread
From: Simpson, Kenny @ 2001-05-23 7:36 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libstdc++/2832
@ 2001-05-22 17:36 bkoz
0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2001-05-22 17:36 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
The following reply was made to PR libstdc++/2832; it has been noted by GNATS.
From: bkoz@gcc.gnu.org
To: 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: 23 May 2001 00:27:50 -0000
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-05-26 2:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-26 2:26 libstdc++/2832 bkoz
-- strict thread matches above, loose matches on Subject: below --
2001-05-24 16:06 libstdc++/2832 bkoz
2001-05-23 11:16 libstdc++/2832 Simpson, Kenny
2001-05-23 7:36 libstdc++/2832 Simpson, Kenny
2001-05-22 17:36 libstdc++/2832 bkoz
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).