public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/5181: basic_ostream::operator<<(streambuf*) wrongly sets eofbit
@ 2001-12-23 15:04 paolo
  0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2001-12-23 15:04 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, simon.saunders

Synopsis: basic_ostream::operator<<(streambuf*) wrongly sets eofbit

State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Sun Dec 23 15:04:08 2001
State-Changed-Why:
    Reproduced with 3.0.3, *not* reproduced with current
    (20011223) mainline on i686-pc-linux-gnu.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5181


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libstdc++/5181: basic_ostream::operator<<(streambuf*) wrongly sets eofbit
@ 2002-01-16 12:24 paolo
  0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2002-01-16 12:24 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, paolo, simon.saunders

Synopsis: basic_ostream::operator<<(streambuf*) wrongly sets eofbit

State-Changed-From-To: feedback->closed
State-Changed-By: paolo
State-Changed-When: Wed Jan 16 12:24:24 2002
State-Changed-Why:
    No feedback forthcoming. In the meanwhile, fixed in 3.0
    branch too.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5181


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: libstdc++/5181: basic_ostream::operator<<(streambuf*) wrongly sets eofbit
@ 2001-12-25  9:04 paolo
  0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2001-12-25  9:04 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, paolo, simon.saunders

Synopsis: basic_ostream::operator<<(streambuf*) wrongly sets eofbit

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Dec 25 09:04:13 2001
Responsible-Changed-Why:
    Taking care of it.
State-Changed-From-To: analyzed->feedback
State-Changed-By: paolo
State-Changed-When: Tue Dec 25 09:04:13 2001
State-Changed-Why:
    In a few days a new snapshot of libstdc++-v3 will be
    released, a version of which (named libstdc++-v3.0.95-gcc-3.0.3.tar.gz)
    can be straightforwardly plugged in in the gcc3.0.3
    distribution. Most certainly it will solve your problem.
    
    Thanks,
    Paolo.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5181


^ permalink raw reply	[flat|nested] 4+ messages in thread

* libstdc++/5181: basic_ostream::operator<<(streambuf*) wrongly sets eofbit
@ 2001-12-23 12:36 simon.saunders
  0 siblings, 0 replies; 4+ messages in thread
From: simon.saunders @ 2001-12-23 12:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5181
>Category:       libstdc++
>Synopsis:       basic_ostream::operator<<(streambuf*) wrongly sets eofbit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 23 12:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Simon Saunders
>Release:        3.0.3
>Organization:
>Environment:
RedHat Linux 6.2
>Description:
After inserting a pointer to a streambuf into an output stream,
the eof bit is set in the output stream and nothing else can
be inserted (unless clear() is called on the stream first).
I think the problem is caused by the function __copy_streambufs
which wrongly sets the eof bit in the output stream.
>How-To-Repeat:
Compile and run this test program. Usage: program infile outfile.
The first argument must be a readable file.
It should copy one file to another and append "Hello\n" to the output file.
With g++ 3.0.3 the "Hello\n" is not written to the output file, and good() returns false.
It works correctly with several other compilers.

/********** Start of test program ***************/

#include <fstream>
#include <iostream>

using namespace std;

int main(int argc, char** argv)
{
	if (argc != 3)
		return 1;
	ifstream i(argv[1]);
	ofstream o(argv[2]);
	o << i.rdbuf();
	cout << o.good() << endl;
	o << "Hello\n";
	return 0;
}
/************** End of test program ******************/
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-16 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-23 15:04 libstdc++/5181: basic_ostream::operator<<(streambuf*) wrongly sets eofbit paolo
  -- strict thread matches above, loose matches on Subject: below --
2002-01-16 12:24 paolo
2001-12-25  9:04 paolo
2001-12-23 12:36 simon.saunders

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).