Bug 12594

Summary: DRs 60 [TC] and 63 [TC] not implemented
Product: gcc Reporter: Pétur Runólfsson <peturrun>
Component: libstdc++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P2    
Version: 3.4.0   
Target Milestone: 3.3.3   
Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu Known to work:
Known to fail: Last reconfirmed: 2003-10-18 17:35:53
Attachments: The patch

Description Pétur Runólfsson 2003-10-13 09:53:33 UTC
This patch somehow fell through the cracks:

http://gcc.gnu.org/ml/libstdc++/2003-09/msg00102.html

Note that this doesn't handle all of DR 60.
Comment 1 Pétur Runólfsson 2003-10-13 09:55:38 UTC
Created attachment 4926 [details]
The patch

2003-09-23  Petur Runolfsson  <peturr02@ru.is>

	* include/bits/ostream.tcc
	(basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
	basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
	basic_ostream::operator<<(ios_base& (*)(ios_base&))):
	Implement the resolution of DR 60 (TC): These are not formatted
	output functions so don't construct sentry objects and don't
	catch exceptions.
	(basic_ostream::put, basic_ostream::write): Implement the
	resolution of DR 63 (TC) by catching exceptions and setting
	badbit.
	(basic_ostream::flush): Implement the resolution of DR 60 (TC):
	This is not an unformatted output function so don't construct
	a sentry object.
	* testsuite/testsuite_io.h (sync_streambuf): Define.
	* testsuite/27_io/basic_ostream/flush/char/2.cc: New test.
	* testsuite/27_io/basic_ostream/inserters_other/char/5.cc: New test.
	* testsuite/27_io/basic_ostream/put/char/1.cc: New test.
	* testsuite/27_io/basic_ostream/write/char/1.cc: New test.
Comment 2 Benjamin Kosnik 2003-11-13 17:22:15 UTC
Sorry about this.... in.

-benjamin
Comment 3 CVS Commits 2003-11-13 17:43:52 UTC
Subject: Bug 12594

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2003-11-13 17:43:48

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: ostream.tcc 
	libstdc++-v3/testsuite: testsuite_io.h 
Added files:
	libstdc++-v3/testsuite/27_io/basic_ostream/flush/char: 2.cc 
	libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char: 
	                                                                 5.cc 
	libstdc++-v3/testsuite/27_io/basic_ostream/put/char: 1.cc 
	libstdc++-v3/testsuite/27_io/basic_ostream/write/char: 1.cc 

Log message:
	2003-11-13  Petur Runolfsson  <peturr02@ru.is>
	
	PR libstdc++/12594
	* include/bits/ostream.tcc
	(basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
	basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
	basic_ostream::operator<<(ios_base& (*)(ios_base&))):
	Implement the resolution of DR 60 (TC): These are not formatted
	output functions so don't construct sentry objects and don't
	catch exceptions.
	(basic_ostream::put, basic_ostream::write): Implement the
	resolution of DR 63 (TC) by catching exceptions and setting
	badbit.
	(basic_ostream::flush): Implement the resolution of DR 60 (TC):
	This is not an unformatted output function so don't construct
	a sentry object.
	* testsuite/testsuite_io.h (sync_streambuf): Define.
	* testsuite/27_io/basic_ostream/flush/char/2.cc: New test.
	* testsuite/27_io/basic_ostream/inserters_other/char/5.cc: New test.
	* testsuite/27_io/basic_ostream/put/char/1.cc: New test.
	* testsuite/27_io/basic_ostream/write/char/1.cc: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2081&r2=1.2082
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/ostream.tcc.diff?cvsroot=gcc&r1=1.46&r2=1.47
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_io.h.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/2.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/5.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/put/char/1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/write/char/1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 4 Andrew Pinski 2003-11-13 17:54:09 UTC
Fixed for 3.4.
Comment 5 CVS Commits 2003-11-26 19:54:45 UTC
Subject: Bug 12594

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	bkoz@gcc.gnu.org	2003-11-26 19:54:41

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: ostream.tcc 

Log message:
	2003-11-26  Petur Runolfsson  <peturr02@ru.is>
	
	PR libstdc++/12594
	* include/bits/ostream.tcc
	(basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
	basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
	basic_ostream::operator<<(ios_base& (*)(ios_base&))):
	Implement the resolution of DR 60 (TC): These are not formatted
	output functions so don't construct sentry objects and don't
	catch exceptions.
	(basic_ostream::put, basic_ostream::write): Implement the
	resolution of DR 63 (TC) by catching exceptions and setting
	badbit.
	(basic_ostream::flush): Implement the resolution of DR 60 (TC):
	This is not an unformatted output function so don't construct
	a sentry object.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.154&r2=1.1464.2.155
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/ostream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.31.14.6&r2=1.31.14.7