public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams
@ 2003-04-28 17:17 bkoz
  0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2003-04-28 17:17 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, peturr02

Synopsis: ios_base::sync_with_stdio clobbers standard streams

State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Mon Apr 28 17:17:32 2003
State-Changed-Why:
    
    Your related patch is in.

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


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

* Re: libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams
@ 2003-04-28 15:17 bkoz
  0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2003-04-28 15:17 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, nobody, peturr02

Synopsis: ios_base::sync_with_stdio clobbers standard streams

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Apr 28 15:17:14 2003
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Mon Apr 28 15:17:14 2003
State-Changed-Why:
    Petur, I don't think this is a bug. Again, with the "any":
    
    If any input or output operation has occurred using the standard streams prior to the call, the effect is implementation-defined. 
    
    I don't believe your patch is needed for standards conformance, but let me look at it for other merits.
    
    best,
    benjamin

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


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

* Re: libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams
@ 2003-03-25 23:50 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2003-03-25 23:50 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, paolo, peturr02

Synopsis: ios_base::sync_with_stdio clobbers standard streams

Responsible-Changed-From-To: paolo->unassigned
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Mar 25 23:39:36 2003
Responsible-Changed-Why:
    Not really working on it, for the time being.

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


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

* Re: libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams
@ 2003-02-08 21:27 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2003-02-08 21:27 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, paolo, peturr02

Synopsis: ios_base::sync_with_stdio clobbers standard streams

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Sat Feb  8 21:27:56 2003
Responsible-Changed-Why:
    Investigating...
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Sat Feb  8 21:27:56 2003
State-Changed-Why:
    Confirmed: upon a call of ios_base::sync_with_stdio(false)
    ios_base is currently fully _destroyed_ and then recreated
    in the new mode: meagre chances to keep intact the state ;)
    Let's what we can do...

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


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

* libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams
@ 2003-01-31 12:26 peturr02
  0 siblings, 0 replies; 5+ messages in thread
From: peturr02 @ 2003-01-31 12:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9523
>Category:       libstdc++
>Synopsis:       ios_base::sync_with_stdio clobbers standard streams
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 31 12:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     peturr02@ru.is
>Release:        gcc-3.2.1
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
If any changes are made to the state of the standard stream objects (cin, cout etc.) before ios_base::sync_with_stdio is called, that state is lost as a result of the call.
>How-To-Repeat:
See attachment.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="syncwstdiobug.cc"
Content-Disposition: inline; filename="syncwstdiobug.cc"

#include <iostream>

#undef NDEBUG
#include <cassert>

int main()
{
	using namespace std;

	int index = ios_base::xalloc();

	cin.iword(index) = 5;
	cout.iword(index) = 5;
	cerr.iword(index) = 5;
	clog.iword(index) = 5;
	wcin.iword(index) = 5;
	wcout.iword(index) = 5;
	wcerr.iword(index) = 5;
	wclog.iword(index) = 5;

	ios_base::sync_with_stdio(false);

	assert(cin.iword(index) == 5);
	assert(cout.iword(index) == 5);
	assert(cerr.iword(index) == 5);
	assert(clog.iword(index) == 5);
	assert(wcin.iword(index) == 5);
	assert(wcout.iword(index) == 5);
	assert(wcerr.iword(index) == 5);
	assert(wclog.iword(index) == 5);

	return 0;
}


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

end of thread, other threads:[~2003-04-28 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-28 17:17 libstdc++/9523: ios_base::sync_with_stdio clobbers standard streams bkoz
  -- strict thread matches above, loose matches on Subject: below --
2003-04-28 15:17 bkoz
2003-03-25 23:50 paolo
2003-02-08 21:27 paolo
2003-01-31 12:26 peturr02

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