Commit Graph

1820 Commits

Author SHA1 Message Date
Paolo Carlini ed24293523 1.cc: Split and fix for missing seeks between gets and puts into...
2003-06-13  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/seekoff/char/1.cc: Split and
	fix for missing seeks between gets and puts into...
	* testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: New.
	* testsuite/27_io/basic_filebuf/seekoff/char/4-io.cc: New.
	* testsuite/27_io/basic_filebuf/seekpos/char/1.cc: Same, into...
	* testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: New.
	* testsuite/27_io/basic_filebuf/seekpos/char/4-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Fix
	for missing seeks between gets and puts.
	* testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Ditto.
	* testsuite/data/seekoff-1.tst: New.
	* testsuite/data/seekoff-2.tst: New.
	* testsuite/data/seekpos-1.tst: New.
	* testsuite/data/seekpos-2.tst: New.

From-SVN: r67913
2003-06-13 21:06:37 +00:00
Nathan C. Myers ca566e4c07 Avoid multi-processor bus contention on increment/decrement-and- test of the reference count in the empty-string object...
2003-06-13  Nathan C. Myers <ncm-nospam@cantrip.org>

	Avoid multi-processor bus contention on increment/decrement-and-
	test of the reference count in the empty-string object, by comparing
        addresses first, and never touching the reference count of the empty-
        string object.
	* include/bits/basic_string.h:
	(_S_empty_rep_storage): Move into basic_string<>::_Rep for use by its
	members.
	(_Rep::_S_empty_rep()): New accessor.
	(_Rep::_M_length, _Rep::_M_capacity, _Rep::_M_references): Move to
	a base class _Rep_base.
	(_Rep::_M_dispose, _Rep::_M_refcopy): Check for the empty string.
	(basic_string()): Change to use _M_refdata() in place of _M_refcopy(),
	since no longer must increment its refcount.
	* include/bits/basic_string.tcc:
	(_Rep::_M_destroy, _M_leak_hard): Check for the empty string and
        return immediately.  The former might be unnecessary.  The latter
        prevents begin() and end() from cloning it unnecessarily.
	(_S_construct(_InIterator, _InIterator, const _Alloc&,
	input_iterator_tag), _S_construct(_InIterator, _InIterator,
	const _Alloc&, forward_iterator_tag), _S_construct(size_type, _CharT,
	const _Alloc&)): Change to use _M_refdata() in place of _M_refcopy().
	(_M_mutate): Check for the empty string and treat it as shared.
        This is necessary here because _M_mutate is sometimes called with
        all-zero arguments; in all other uses of _M_is_shared, the test comes
        out right anyhow.

From-SVN: r67912
2003-06-13 20:59:42 +00:00
Benjamin Kosnik c37514ff62 allocator-inst.cc: Explicitly instantiate.
2003-06-12  Benjamin Kosnik  <bkoz@redhat.com>

	* src/allocator-inst.cc: Explicitly instantiate.
	* include/ext/pool_allocator.h: Inhibit implicit instantiations.
	Tweaks.
	* config/linker-map.gnu: Add __pool_alloc bits. Tweaks.

From-SVN: r67882
2003-06-13 05:45:57 +00:00
Benjamin Kosnik 58ac1d7f0e acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
2003-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
	* aclocal.m4: Regenerate.
	* Makefile.am (SUBDIRS): Remove libio.
	* Makefile.in: Regenerate.
	* configure.in: Same.
	* configure: Regenerate.
	* config/io/basic_file_libio.cc: Remove.
	* config/io/basic_file_libio.h: Remove.
	* config/io/c_io_libio_codecvt.c: Remove.
	* config/io/c_io_libio.h: Remove.
	* libio/*: Remove.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.
	* docs/html/configopts.html: Edits.
	* docs/html/explanations.html: Edits.

From-SVN: r67813
2003-06-12 03:24:16 +00:00
Benjamin Kosnik 1ff9402d8f [multiple changes]
2003-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_alloc.h (__debug_alloc): Move out.
	(__malloc_alloc): Same.
	(__pool_alloc): Same.
	(__new_alloc): Same.
	Rename to..
	* include/bits/allocator.h: ...this.
	* include/bits/stl_deque.h: Modify comment.
	* include/bits/stl_tree.h: Modify include.
	* include/std/std_memory.h: Same.
	* include/ext/rope: Same.
	* include/ext/slist: Same.
	* include/std/std_vector.h: Same.
	* include/std/std_stack.h: Same.
	* include/std/std_queue.h: Same.
	* include/std/std_list.h: Same.
	* include/std/std_deque.h: Same.
	* include/backward/alloc.h: Same.
	* include/ext/debug_allocator.h: New.
	* include/ext/malloc_allocator.h: New.
	* include/ext/pool_allocator.h: New.
	* include/ext/new_allocator.h: New.
	* include/bits/pthread_allocimpl.h: Remove.
	* include/bits/stl_pthread_alloc.h: Remove.
	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* src/stl-inst.cc: Use __gnu_cxx namespace.
	* src/stl-inst.cc: Move to...
	* src/allocator-inst.cc: Here.
	* src/Makefile.am (sources): Update.
	* src/Makefile.in: Regenerate.
	* config/linker-map.gnu: Remove __pool_alloc bits.
	* testsuite/ext/headers.cc: Add.
	* testsuite/ext/allocators.cc: Fixup.

2003-06-11  Stefan Olsson  <stefan@snon.net>
            Ola R�nnerup  <fnolis@home.se>

	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* include/ext/mt_allocator.h: New file.

From-SVN: r67777
2003-06-11 15:52:11 +00:00
Paolo Carlini 1f0ef65117 fstream.tcc (close): Clean up a bit.
2003-06-10  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (close): Clean up a bit.

	* include/bits/streambuf.tcc (sbumpc): Clean up a bit.

	* include/std/std_fstream.h (_M_destroy_pback): _M_pback_cur_save
	- the saved _M_in_cur, that is - cannot be null.
	(sync): Constify a variable.

	* include/std/std_streambuf.h: Tweak a comment.
	(in_avail): Constify a variable.

From-SVN: r67738
2003-06-10 22:00:43 +00:00
Phil Edwards 08addde65f BUGS: Update from 2.90.8 snapshot.
2003-06-10  Phil Edwards  <pme@gcc.gnu.org>

	* docs/html/17_intro/BUGS:  Update from 2.90.8 snapshot.
	* docs/html/17_intro/CHECKLIST:  Bring up to date with respect to
	correctness of container::iterator typedefs.  Fix whitespace.
	* docs/html/20_util/howto.html, docs/html/ext/howto.html:  Add links
	to allocator docs.
	* docs/html/documentation.html:  Regenerate.

	* include/bits/basic_string.h, include/bits/basic_string.tcc,
	include/bits/deque.tcc, include/bits/list.tcc, include/bits/stl_algo.h,
	include/bits/stl_algobase.h, include/bits/stl_bvector.h,
	include/bits/stl_deque.h, include/bits/stl_iterator_base_funcs.h,
	include/bits/stl_list.h, include/bits/stl_uninitialized.h,
	include/bits/stl_vector.h, include/bits/vector.tcc,
	include/ext/algorithm, include/ext/slist, include/std/std_bitset.h:
	Change _Iter names to _Iterator, and __pos to __position.

	* include/bits/stl_relops.h, include/bits/stl_numeric.h,
	include/bits/stl_multiset.h, include/bits/stl_set.h:
	Remove emacs markers.

	* include/bits/stl_threads.h (_STL_auto_lock):  Add __unused__.

From-SVN: r67736
2003-06-10 21:52:25 +00:00
Paolo Carlini 9335d80ab9 fstream.tcc (overflow): According to 27.5.2.4.5, overflow() returns not_eof(eof()).
2003-06-10  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (overflow): According to
	27.5.2.4.5, overflow() returns not_eof(eof()).
	* testsuite/27_io/basic_filebuf/overflow/char/2.cc: New.
	* testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc: Ditto.

2003-06-10  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (_M_underflow): Check overflow return
	value; tweak slightly.

From-SVN: r67726
2003-06-10 19:27:12 +00:00
Paolo Carlini f10eea7bae fstream.tcc (_M_underflow): Do not special case the unbuffered case...
2003-06-09  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (_M_underflow): Do not special
	case the unbuffered case, which really means simply a one char
	get area.
	(basic_filebuf): Initialize _M_buf_size.
	(setbuf): Unbuffered means _M_buf_size == 1, since only
	_M_buf_size - 1 == 0 chars are going to be used for the
	put area and 1 for the get area.
	* include/std/std_streambuf.h (_M_buf_size): Move to basic_filebuf.
	(~basic_streambuf): Tweak.
	(basic_streambuf): Do not initialize _M_buf_size.
	* include/std/std_fstream.h (_M_buf_size): Add from basic_streambuf.
	(~basic_filebuf): Tweak.
	(_M_set_buffer): Tweak, considering that _M_buf_size == 1 is the
	unbuffered situation (i.e., put area pointers NULL).
	* include/bits/streambuf.tcc (sbumpc): Clean up.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc: New.

From-SVN: r67686
2003-06-10 00:05:49 +00:00
Phil Edwards 16da539b7d acinclude.m4: Move all AM_CONDITIONAL calls out.
2003-06-09  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Move all AM_CONDITIONAL calls out.
	(GLIBCPP_CONFIGURE):  Set defaults for variables used in AM_CONDITIONAL
	statements.
	* configure.in:  Centralize AM_CONDITIONALs so that they are always
	run.  Make use of GLIBCPP_IS_CROSS_COMPILING.
	* aclocal.m4, configure:  Regenerated.

From-SVN: r67663
2003-06-09 14:54:08 +00:00
Paolo Carlini c7d251ba2d howto.html ('LWG Issues'): Add issue 235.
2003-06-09  Paolo Carlini  <pcarlini@unitus.it>

	* docs/html/ext/howto.html ('LWG Issues'):  Add issue 235.

From-SVN: r67659
2003-06-09 11:54:53 +00:00
Nathan Myers d56a88114a 2003-06-06 Nathan Myers <ncm-nospam@cantrip.org>
* include/bits/stl_iterator.h
	(reverse_iterator::reverse_iterator()): Apply DR235: default
	constructor default-initializes data member.  Instantiated on a
	pointer type, the member has to end up equal to zero.

From-SVN: r67559
2003-06-06 17:19:56 +00:00
Benjamin Kosnik b2acb86f5b stl_alloc.h: Cleanups.
2003-06-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_alloc.h: Cleanups.
	* include/ext/functional: Same.
	* include/ext/hash_map: Same.
	* include/ext/hash_set: Same.
	* include/ext/iterator: Same.
	* include/ext/memory: Same.
	* include/ext/numeric: Same.
	* include/ext/rb_tree: Same.
	* include/ext/ropeimpl.h: Same.
	* include/ext/slist: Same.
	* include/ext/stdio_filebuf.h: Same.
	* include/ext/stdio_sync_filebuf.h: Same.
	* include/ext/stl_rope.h: Move to...
	* include/ext/rope: ...here.
	* include/ext/stl_hash_fun.h: Move to...
	* include/ext/hash_fun.h: ...here.
	* include/ext/stl_hashtable.h: Move to...
	* include/ext/hashtable.h: ...here.
	* include/backward/hashtable.h: Reflect new names.
	* include/Makefile.am: Same.
	* include/Makefile.in: Regenerated.

From-SVN: r67551
2003-06-06 15:50:28 +00:00
Benjamin Kosnik 46c4e5d6e9 re PR libstdc++/9024 (Input fails after call to basic_filebuf<>::pubsetbuf(0, 0))
2003-06-05  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/9024
	* include/bits/fstream.tcc (_M_underflow): Fix for unbuffered.
	* include/bits/stl_algobase.h: Tweak.
	* include/std/std_fstream.h: Move _M_buf_size to...
	* include/std/std_streambuf.h: ...here. Modify.
	* include/bits/streambuf.tcc: Same.
	* testsuite/testsuite_hooks.h: Tweak.
	* testsuite/testsuite_io.h (constraint_filebuf): New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/2.cc: Split into...
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc: New.
	* testsuite/27_io/basic_filebuf/sgetn/char/3.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/snextc/char/2-out.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sputc/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/2.cc: Split into...
	* testsuite/27_io/basic_filebuf/sputc/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/1.cc: Split into...
	* testsuite/27_io/basic_filebuf/sputn/char/1-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/2-in.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: New.
	* testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: New.
	* testsuite/data/sgetc.txt: New.
	* testsuite/data/sgetn.txt: New.

From-SVN: r67524
2003-06-06 00:19:17 +00:00
Paolo Carlini 1e64c2fc32 re PR libstdc++/11095 (C++ iostream manipulator causes segfault when called iwth negative argument)
2003-06-05  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/11095
	* include/bits/istream.tcc (operator>>(basic_istream&, _CharT*)):
	Deal with width() smaller than zero.
	* include/bits/ostream.tcc (operator<<(basic_ostream&, _CharT),
	operator<<(basic_ostream&, char), operator<<(basic_ostream&,
	const _CharT*), operator<<(basic_ostream<_CharT, _Traits>&,
	const char*), operator<<(basic_ostream<char, _Traits>&,
	const char*), operator<<(basic_ostream, const basic_string&)): Likewise.
	* testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc:
	* testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc:
	* testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc:
	* testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc:
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc:
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc:
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc:
	New.

From-SVN: r67518
2003-06-05 23:25:05 +00:00
Rainer Orth bddc310768 acinclude.m4 (GLIBCPP_CHECK_PCH): Only set glibcpp_PCHFLAGS if .gch compilation works.
* acinclude.m4 (GLIBCPP_CHECK_PCH): Only set glibcpp_PCHFLAGS if
	.gch compilation works.
	* aclocal.m4, configure: Regenerate.
	* testsuite_flags.in (--build-cxx): Use glibcpp_PCHFLAGS to
	initialize PCHFLAGS.

From-SVN: r67515
2003-06-05 22:22:12 +00:00
Paolo Carlini 7778fa6e3b basic_string.h (_M_fold, [...]): Constify various variables.
2003-06-04  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/basic_string.h (_M_fold, insert(iterator, _CharT),
	erase(iterator), erase(iterator, iterator), c_str,
	compare(const basic_string&)): Constify various variables.
	* include/bits/basic_string.tcc (_S_construct(_InIter, _InIter,
	const _Alloc&, input_iterator_tag), _M_destroy, _M_mutate,
	_S_create, resize, _M_replace, _M_replace_safe,
	append(const basic_string&), append(const basic_string&, size_type,
	size_type), append(const _CharT*, size_type), append(size_type,
	_CharT), operator+(const _CharT*, const basic_string&),
	operator+(_CharT, const basic_string&), replace(iterator, iterator,
	size_type, _CharT), find(const _CharT*, size_type, size_type),
	find(_CharT, size_type), rfind(const _CharT*, size_type, size_type),
	rfind(_CharT, size_type), compare(size_type, size_type,
	const basic_string&), compare(size_type, size_type,
	const basic_string&, size_type, size_type), compare(const _CharT*),
	compare(size_type, size_type, const _CharT*), compare(size_type,
	size_type, const _CharT*, size_type)): Likewise.

From-SVN: r67468
2003-06-04 22:53:05 +00:00
Benjamin Kosnik f24ce7c1c3 fstream.tcc (pbackfail): Make a rarely taken 'if' branch less obscure.
2003-06-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fstream.tcc (pbackfail): Make a rarely taken
	'if' branch less obscure.

From-SVN: r67394
2003-06-03 18:06:09 +00:00
Andrew Pinski 159ca3a3a4 re PR libstdc++/9815 (atomicity.h - fails to compile with -O3 -masm=intel)
2003-06-02  Andrew Pinski  <pinskia@physics.uc.edu>

	PR libstdc++/9815
	* config/cpu/i386/atomicity.h (__exchange_and_add): add intel
	asm case to asm.
	* config/cpu/i486/atomicity.h (__exchange_and_add): Likewise.
	(__atomic_add): likewise.

From-SVN: r67343
2003-06-02 18:38:32 +00:00
Paolo Carlini 62929dd980 sstream.tcc (pbackfail): Minor clean up and reformatting, consistent with basic_filebuf::pbackfail.
2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (pbackfail): Minor clean up and
	reformatting, consistent with basic_filebuf::pbackfail.

From-SVN: r67342
2003-06-02 18:24:30 +00:00
Richard Kreckel cc9c608f08 re PR libstdc++/11062 (Please avoid __attribute__ ((unused)))
2003-06-02  Richard Kreckel  <Richard.Kreckel@GiNaC.DE>

	PR libstdc++/11062
	* config/cpu/mips/atomicity.h:  Change __attribute__ ((unused)) to
	__attribute__ ((__unused__)).
	* config/os/aix/atomicity.h:  Likewise.

From-SVN: r67340
2003-06-02 18:03:23 +00:00
Paolo Carlini b166bded9e re PR libstdc++/9761 (filebuf::pbackfail discards previously put back characters)
2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9761
	* include/bits/fstream.tcc (pbackfail): If the pback buffer
	is already active don't try to store in it a second char.
	* testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc: New.

	* include/bits/fstream.tcc (pbackfail): Add unbuffered bits.

From-SVN: r67337
2003-06-02 16:46:28 +00:00
Paolo Carlini f275a768ab 3.cc: Tweak line spacing.
2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_stringbuf/seekpos/char/3.cc: Tweak
	line spacing.

From-SVN: r67336
2003-06-02 15:53:14 +00:00
Paolo Carlini ccb50b8111 std_fstream.h (_M_destroy_pback): Use _M_in_beg instead of unnecessarily taking the address of _M_pback.
2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_fstream.h (_M_destroy_pback): Use _M_in_beg
	instead of unnecessarily taking the address of _M_pback.
	(xsgetn): Simplify slightly for a single char pback buffer.

2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (seekoff): Remove four unnecessary
	variables and two 'if', clean up.

2003-06-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (seekpos): Test against _M_out_lim
	not _M_out_end, since the former actually points to the string
	end (vs buffer end).
	* testsuite/27_io/basic_stringbuf/seekpos/char/3.cc: New.

From-SVN: r67334
2003-06-02 15:36:24 +00:00
Phil Edwards a75e519150 filter: New file.
2003-05-30  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/filter:  New file.
	* docs/doxygen/filter.sed:  New file.
	* docs/doxygen/run_doxygen:  Add g flag to sed substitutions.  Duh.
	* docs/doxygen/user.cfg.in (INPUT_FILTER):  Point to new filter.
	* docs/html/documentation.html:  Fix links to doxygen pages.

From-SVN: r67249
2003-05-30 19:12:56 +00:00
Paolo Carlini c5b6351bd6 fstream.tcc (_M_convert_to_external): Don't check for __ilen > 0.
2003-05-30  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (_M_convert_to_external): Don't
	check for __ilen > 0.

From-SVN: r67240
2003-05-30 11:39:56 +00:00
Paolo Carlini 86f6262d61 [multiple changes]
2003-05-29  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>

	PR libstdc++/10783
	* include/bits/stl_iterator.h (class __normal_iterator):
	Don't inherit from iterator, add missing typedefs.

2003-05-29  Paolo Carlini <pcarlini@unitus.it>

	* testsuite/24_iterators/reverse_iterator.cc: Split up, as follows.
	* testsuite/24_iterators/reverse_iterator/1.cc: New.
	* testsuite/24_iterators/reverse_iterator/2.cc: New.
	* testsuite/24_iterators/reverse_iterator/3.cc: New, from
	PR libstdc++/10783.

From-SVN: r67223
2003-05-29 12:21:26 +00:00
Brendan Kehoe f85716e06e locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and make sure the number of digits required after the...
2003-05-26  Brendan Kehoe  <brendan@zen.org>

    * include/bits/locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and
    make sure the number of digits required after the decimal-point
    (if any) is exactly the value returned by frac_digits().
    * testsuite/22_locale/money_get/get/char/9.cc: New.
    * testsuite/22_locale/money_get/get/wchar_t/9.cc: New.

From-SVN: r67196
2003-05-27 18:44:26 -04:00
Steve Ellcey ed0d100f7c os_defines.h: Define _LIBUNWIND_STD_ABI if we are on IA64 HP-UX.
* config/os/hpux/os_defines.h: Define _LIBUNWIND_STD_ABI if we are
	on IA64 HP-UX.
	* libsupc++/eh_throw.cc: Don't call _Unwind_Resume_or_Rethrow if
	_LIBUNWIND_STD_ABI is set.

From-SVN: r67193
2003-05-27 21:45:48 +00:00
Brendan Kehoe 87a7c5a1ef locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and make sure the number of digits required after the...
2003-05-26  Brendan Kehoe  <brendan@zen.org>

    * include/bits/locale_facets.tcc (do_get): Honor $22.2.6.3.3/8 and
    make sure the number of digits required after the decimal-point
    (if any) is exactly the value returned by frac_digits().

From-SVN: r67192
2003-05-27 17:14:49 -04:00
Jonathan Wakely 0f35d19264 std_istream.h, [...]: Typo in comment.
2003-05-27  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/std/std_istream.h, include/std/std_ostream.h: Typo in comment.

From-SVN: r67187
2003-05-27 14:29:39 +01:00
Benjamin Kosnik 002bd6069c re PR libstdc++/9339 (filebuf::pubsetbuf(0, 0) doesn't turn off buffering)
2003-05-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/9339
	* include/std/std_fstream.h (basic_filebuf::_M_overflow): Remove.
	(_M_pback): No array necessary.
	* include/bits/fstream.tcc (basic_filebuf::_M_overflow): Add
	unbuffered case, coalesec into ...
	(basic_filebuf::overflow): ...this.
	* testsuite/27_io/basic_filebuf/sputn/char/9339.cc: New.
	* testsuite/27_io/basic_filebuf/sputc/char/2.cc: Unbuffered.

From-SVN: r67175
2003-05-26 14:54:42 +00:00
Nathanael Nerode cbecceb923 Makefile.am, [...]: Replace "GNU CC" with "GCC".
2003-05-24  Nathanael Nerode  <neroden@gcc.gnu.org>

	* libsupc++/Makefile.am, libsupc++/cxxabi.h, libsupc++/del_op.cc,
	libsupc++/del_opnt.cc, libsupc++/del_opv.cc, libsupc++/del_opvnt.cc,
	libsupc++/eh_alloc.cc, libsupc++/eh_aux_runtime.cc,
	libsupc++/eh_catch.cc, libsupc++/eh_exception.cc,
	libsupc++/eh_globals.cc, libsupc++/eh_personality.cc,
	libsupc++/eh_term_handler.cc, libsupc++/eh_terminate.cc,
	libsupc++/eh_throw.cc, libsupc++/eh_type.cc,
	libsupc++/eh_unex_handler.cc, libsupc++/exception,
	libsupc++/new, libsupc++/new_handler.cc, libsupc++/new_op.cc,
	libsupc++/new_opnt.cc, libsupc++/new_opv.cc, libsupc++/new_opvnt.cc,
	libsupc++/pure.cc, libsupc++/tinfo.cc, libsupc++/tinfo2.cc,
	libsupc++/typeinfo, libsupc++/unwind-cxx.h, libsupc++/vec.cc:
	Replace "GNU CC" with "GCC".

From-SVN: r67155
2003-05-24 16:22:03 +00:00
Nathanael Nerode c4d880174e * include/backward/new.h: Replace "GNU CC" with "GCC".
From-SVN: r67147
2003-05-24 04:50:19 +00:00
Benjamin Kosnik b731048b47 re PR libstdc++/3066 (configure.in generates bad arguments for cross compiling libraries)
2003-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/3066.
	* configure.in: Switch target to host, don't assume newlib.
	(target_alias): Remove.
	* configure: Regenerate.
	* acinclude.m4: Same.
	* aclocal.m4: Regenerate.
	* configure.target: Same. Rename to...
	* configure.host: This.

From-SVN: r67110
2003-05-23 02:31:07 +00:00
Paolo Carlini d7ccc91760 std_fstream.h (_S_pback_size): Remove definition.
2003-05-22  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_fstream.h (_S_pback_size): Remove definition.
	(_M_create_pback(), _M_destroy_pback()): Simplify for a single-char
	pback buffer.
	* include/bits/fstream.tcc (_S_pback_size): Remove declaration.
	* testsuite/27_io/basic_filebuf/3.cc: Remove explicit instantiation
	of _S_pback_size for systems with no COMDAT or weak support.
	* testsuite/27_io/basic_filebuf/seekoff/10132-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/10132-3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/10096.cc: Likewise.
	* testsuite/27_io/basic_fstream/3.cc: Likewise.
	* testsuite/27_io/basic_ifstream/3.cc: Likewise.
	* testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Likewise.
	* testsuite/27_io/basic_ofstream/3.cc: Likewise.
	* testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Likewise.
	* testsuite/27_io/basic_streambuf/3.cc: Likewise.

From-SVN: r67102
2003-05-22 22:16:41 +00:00
Paolo Carlini 0aef8de2ae fstream.tcc (_M_underflow): simplify...
2003-05-22  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (_M_underflow): simplify:
	!__testout implies _M_filepos == _M_in_end, therefore
	the first _M_file.seekoff call is never issued.

From-SVN: r67094
2003-05-22 18:44:02 +00:00
Benjamin Kosnik e8751f3527 [multiple changes]
2003-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in: Sort cross table.
	* configure: Regenerate.

2003-05-22  Brad Spencer  <spencer@infointeractive.com>

	* configure.in: Add Solaris cross bits.

From-SVN: r67091
2003-05-22 17:04:13 +00:00
Danny Smith 81888fcd42 gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero value, not just if defined.
* gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero
	value, not just if defined.

	* libstdc++-v3/config/os/mingw32/os_defines.h (__GTHREAD_HIDE_WIN32API):
	Define to 1 by defualt.
	(NOMINMAX): Define.

From-SVN: r67069
2003-05-21 22:16:08 +00:00
Paolo Carlini 98ce9d068e std_fstream.h (_M_set_buffer): Fix indentation.
2003-05-21  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_fstream.h (_M_set_buffer): Fix indentation.

From-SVN: r67065
2003-05-21 20:22:25 +00:00
Jonathan Wakely b3b33a51bd index.html: Fix typo.
2003-05-21  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.html: Fix typo.
	* docs/html/faq/index.txt: Regenerate.

From-SVN: r67061
2003-05-21 13:18:45 +01:00
Jonathan Wakely baf64b4ec1 test.html: Fix markup.
2003-05-21  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/test.html: Fix markup.

From-SVN: r67060
2003-05-21 13:15:18 +01:00
Danny Smith 93c858e31a stubs.c (hypot, [...]): Don't divide by zero.
* libmath/stubs.c (hypot, hypotf, hypotl): Don't divide by
	zero.
	Update copyright year.

From-SVN: r67051
2003-05-21 00:51:24 +00:00
Paolo Carlini 69cf7a5532 4.cc: Fix typo.
2003-05-20  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/close/char/4.cc: Fix typo.

From-SVN: r67043
2003-05-20 23:03:28 +00:00
Paolo Carlini 80416931e3 5.cc: New file, further testing that upon filebuf::close() 27.8.1.1,3 is enforced.
2003-05-20  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/close/char/5.cc: New file,
	further testing that upon filebuf::close() 27.8.1.1,3 is enforced.

From-SVN: r67042
2003-05-20 22:43:30 +00:00
Gerald Pfeifer e5a3a5b240 stl_alloc.h (__default_alloc_template::_S_chunk_alloc): Cast via void* to avoid -Wcast-align warnings.
* include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
	Cast via void* to avoid -Wcast-align warnings.
	(__default_alloc_template::_S_refill): Likewise.

From-SVN: r67041
2003-05-20 22:29:54 +00:00
Benjamin Kosnik ca5e1be83d README: Move to...
2003-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Move to...
	* docs/html/test.html: ...here. Add documentation.
	* docs/html/install.html: Move testing bits out..
	* docs/html/documentation.html: Add separate testing link.
        * testsuite/performance: Add.
        * testsuite/performance/allocator.cc: New.
        * testsuite/performance/complex_norm.cc: New.
        * testsuite/performance/cout_insert_int.cc: New.
        * testsuite/performance/fstream_seek_write.cc: New.
        * testsuite/performance/ifstream_getline.cc: New.
        * testsuite/performance/map_create_fill.cc: New.
        * testsuite/performance/ofstream_insert_float.cc: New.
        * testsuite/performance/ofstream_insert_int.cc: New.
        * testsuite/performance/string_append.cc: New.
	* testsuite/lib/libstdc++-v3-dg.exp (v3-compute-tests): Filter
	performance tests.

From-SVN: r67040
2003-05-20 22:25:09 +00:00
Gabriel Dos Reis 1db0418ae5 re PR libstdc++/10689 (pow(std::complex(0),1/3) returns (nan, nan) instead of 0.)
PR libstdc++/10689
	* include/std/std_complex.h (pow): Tidy

From-SVN: r66989
2003-05-20 06:52:11 +00:00
Paolo Carlini eab1ff73c8 4.cc: New file, testing that upon filebuf::close() 27.8.1.1,3 is enforced.
2003-05-19  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/close/char/4.cc: New file, testing
	that upon filebuf::close() 27.8.1.1,3 is enforced.

From-SVN: r66970
2003-05-19 18:12:34 +00:00
Loren J. Rittle 07d751829e * testsuite/thread/pthread4.cc: Further tweak to avoid fini race.
From-SVN: r66856
2003-05-16 02:34:14 +00:00
Paolo Carlini e3033a2240 fstream.tcc (_M_overflow): Rewrote to call _M_convert_to_external only once (_M_buf_size is now the size...
2003-05-15  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>

	* include/bits/fstream.tcc (_M_overflow): Rewrote to call
	_M_convert_to_external only once (_M_buf_size is now the size of
	the put area + 1 for the overflow char of a full area); call
	_M_set_buffer instead of _M_set_indeterminate.
	(setbuf): Don't accept a buffer smaller than 2 chars.
	(_M_underflow): Refill _M_buf_size - 1 chars; call _M_set_buffer,
	instead of _M_set_determinate.
	(open): Call _M_set_buffer, instead of _M_set_indeterminate.
	(seekoff): Likewise.
	* include/ext/stdio_filebuf.h (stdio_filebuf(int,
	std::ios_base::openmode, bool, size_t),
	stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t):
	Likewise.
	* include/std/std_fstream.h (_M_set_indeterminate): Remove.
	(_M_set_determinate): Rename as _M_set_buffer, _M_buf_size ->
	_M_buf_size - 1.
	* include/std/std_streambuf.h: Tweak _M_out_lim comment.
	* testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Tweak, taking
	into account that, for _M_buf_size == BUFSIZ == 8192, the size of
	the put area is now BUFSIZ - 1.
	* testsuite/ext/stdio_filebuf_2.cc: Tweak, taking into account
	that now the smallest _M_buf_size is 2 (still fails, for the same
	reason, with 3.2.3)

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r66848
2003-05-15 23:43:15 +00:00
Loren J. Rittle b625fdb750 * testsuite/thread/pthread4.cc: Tweak test.
From-SVN: r66817
2003-05-15 02:24:13 +00:00
Benjamin Kosnik 979c310f5e copy_neg.cc: Remove excess errors dg marker, use dg-errors instead.
2003-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_base/cons/copy_neg.cc: Remove
	excess errors dg marker, use dg-errors instead.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
	* testsuite/20_util/auto_ptr_neg.cc: Same.

From-SVN: r66797
2003-05-14 04:30:40 +00:00
Benjamin Kosnik 0cd1de6fc9 std_fstream.h (basic_filebuf::_M_codecvt): Add cached member.
2003-05-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_fstream.h (basic_filebuf::_M_codecvt): Add
	cached member.
	* include/bits/fstream.tcc (basic_filebuf::basic_filebuf):
	Initialize _M_codecvt.
	(basic_filebuf::imbue): Same.
	(basic_filebuf::showmanyc): Use it.
	(basic_filebuf::underflow): Use it.
	(basic_filebuf::_M_convert_to_external): Use it.
	(basic_filebuf::seekoff): Use it.
	(basic_filebuf::imbue): Use it, tweaks.
	* include/bits/localefwd.h (__check_facet): New.
	* include/bits/locale_classes.h: Tweaks.
	* include/bits/locale_facets.tcc: Tweaks.
	* include/bits/basic_ios.h (basic_ios::_M_check_facet): Remove.
	_M_fctype to _M_ctype, _M_fnumput to _M_num_put, _M_fnumget to
	_M_num_get. Change _M_check_facet to __check_facet. Tweaks.
	* include/bits/basic_ios.tcc: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/ostream.tcc: Same.
	* include/std/std_streambuf.h: Same.
	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/3.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/1.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc: New.

From-SVN: r66781
2003-05-13 20:13:15 +00:00
Paolo Carlini 1f61755cdb 1.cc: Remove unnecessary includes and unused string literals.
2003-05-12  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/sgetc/char/1.cc: Remove
	unnecessary includes and unused string literals.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputc/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputn/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sungetc/char/1.cc: Likewise.

From-SVN: r66735
2003-05-12 21:01:39 +00:00
Benjamin Kosnik 6e81c6f49c From-SVN: r66726 2003-05-12 18:12:27 +00:00
Benjamin Kosnik a72a4f3d37 10096.cc: Add weak bits.
2003-05-12  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/basic_filebuf/underflow/10096.cc: Add weak bits.

From-SVN: r66724
2003-05-12 16:10:55 +00:00
Phil Edwards d7d89a5816 Makefile.am: Properly quote /both/ LD_RUN_PATHs.
2003-05-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/Makefile.am:  Properly quote /both/ LD_RUN_PATHs.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r66706
2003-05-12 00:41:35 +00:00
Phil Edwards 69da919759 Makefile.am: Properly quote LD_RUN_PATH.
2003-05-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/Makefile.am:  Properly quote LD_RUN_PATH.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r66701
2003-05-12 00:00:05 +00:00
Gabriel Dos Reis cdc958d823 re PR libstdc++/3181 (Unable to use sqrt,cos,sin,... with int argument.)
PR libstdc++/3181
	* include/c_std/std_cmath.h: #include <bits/cpp_type_traits.h>
	(acos): Handle integer argument.
	(asin): Likewise.
	(atan): Likewise.
	(atan2): Likewise.
	(ceil): Likewise.
	(cos): Likewise.
	(cosh): Likewise.
	(exp): Likewise.
	(fabs): Likewise.
	(floor): Likewise.
	(frexp): Likewise.
	(ldexp): Likewise.
	(log): Likewise.
	(log10): Likewise.
	(sin): Likewise.
	(sinh): Likewise.
	(sqrt): Likewise.
	(tan): Likewise.
	(tanh): Likewise.
	* include/bits/cpp_type_traits.h (__are_same<>): New traits.
	(__enable_if): Likewise.
	* testsuite/26_numerics/cmath/overloads.C: New test.

From-SVN: r66681
2003-05-11 09:07:17 +00:00
Benjamin Kosnik 51ff814940 [multiple changes]
2003-05-10  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9027
	PR libstdc++/9520
	PR libstdc++/10096
	* include/bits/fstream.tcc (basic_file::_M_underflow):  Add generic
	implementation, based on old wchar_t specialization, add support
	for codecvt::in() return value of codecvt_base::noconv, remove
	_M_file.sys_ungetc() call.
	* include/std/std_fstream.h (basic_file::underflow,
	basic_file::uflow, basic_file::_M_underflow):  Remove
	specialization declarations, call _M_underflow from generic versions
	of underflow and uflow.
	* src/fstream.cc (basic_file::underflow, basic_file::uflow,
	basic_file::_M_underflow):  Remove specializations.
	* src/Makefile.am (sources):  Remove fstream.cc.
	* src/Makefile.in:  Regenerated.
	* testsuite/27_io/basic_filebuf/underflow/10096.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/char/1.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/char/9027.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc:  New test.

2003-05-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stdio_filebuf.h (__stdio_filebuf): Remove stack
	buffer.
	* config/io/basic_file_stdio.h (__basic_file::xsgetn): Remove
	unbuffered bits.
	(__basic_file::xsputn): Same.
	(__basic_file::seekoff): Same.
	(__basic_file::seekpos): Same.
	(__basic_file::showmanyc): Same.
	* config/io/basic_file_stdio.cc: Same.
	* include/std/std_fstream.h: Same.
	* include/bits/fstream.tcc: Same.
	* src/fstream.cc: Same.
	* testsuite/27_io/basic_filebuf/sgetn/char/1.cc (test05): Tidy.

2003-05-10  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9520
	PR libstdc++/9661
	PR libstdc++/9662
	* include/ext/stdio_sync_filebuf.h:  New file.
	(basic_stdiobuf):  New.
	* include/Makefile.am (ext_headers): Add ext/stdio_sync_filebuf.h
	* include/Makefile.in: Regenerate.
	* include/bits/ios_base.h (Init::_S_create_buffers,
	Init::_S_destroy_buffers):  Remove declarations.
	* src/globals.cc (buf_cout_sync, buf_cin_sync, buf_cerr_sync,
	buf_wcout_sync, buf_wcin_sync, buf_wcerr_sync):  Define.
	* src/ios.cc (Init::_S_create_buffers,
	Init::_S_destroy_buffers):  Remove.
	(Init::Init):  Create and use syncronized buffers.
	(ios_base::sync_with_stdio):  Destroy syncronized buffers,
	create and install unsyncronized buffers.
	* testsuite/27_io/objects/char/10.cc:  New test.
	* testsuite/27_io/objects/char/9.cc:  New test.
	* testsuite/27_io/objects/char/9661-1.cc:  New test.
	* testsuite/27_io/objects/char/9661-2_xin.cc:  New test.
	* testsuite/27_io/objects/char/9661-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/1.cc:  New test.
	* testsuite/27_io/objects/wchar_t/10.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-1_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-1_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/2523-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/3045.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3647.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/4_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/4_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/5.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5268.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5280_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5280_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6548_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6548_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6648-1_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6648-1_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6648-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6648-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/7.cc:  New test.
	* testsuite/27_io/objects/wchar_t/7744_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/7744_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/8.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/9520.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-1.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/9662.cc:  New test.
	* testsuite/ext/stdiobuf_char.cc:  New test.
	* testsuite/ext/stdiobuf_wchar_t.cc:  New test.

From-SVN: r66678
2003-05-11 04:20:57 +00:00
Paolo Carlini 6e39f8601a 3.cc: Remove unnecessary includes and unused string literals.
2003-05-10  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/basic_filebuf/close/char/3.cc: Remove
	unnecessary includes and unused string literals.
	* testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Likewise.

From-SVN: r66663
2003-05-10 15:05:15 +00:00
Paolo Carlini db7948c2d8 std_streambuf.h (setg, setp): Don't touch _M_mode.
2003-05-08  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (setg, setp): Don't touch _M_mode.

From-SVN: r66595
2003-05-08 11:47:45 +00:00
Richard Henderson a944ceb94a except.c: Revert 04-01 and 04-02 forced-unwind changes.
gcc/
        * except.c: Revert 04-01 and 04-02 forced-unwind changes.
        * flags.h, toplev.c, doc/invoke.texi: Likewise.

        * unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning.
        * unwind.inc (_Unwind_DeleteException): Check for null
        exception_cleanup.

        * unwind-sjlj.c (_Unwind_SjLj_Resume_or_Rethrow): New.
        * unwind.inc (_Unwind_Resume_or_Rethrow): New.
        * unwind.h: Declare them.
        * libgcc-std.ver (GCC_3.3): Export them.

gcc/cp/
        * cfns.gperf: Comment out POSIX thread cancellation points,
        plus abort and raise.
        * cfns.h: Regenerate.

gcc/testsuite/
        * g++.dg/eh/forced1.C: Expect catch-all handlers to run.
        Verify exception_cleanup not called for rethrows.
        * g++.dg/eh/forced2.C: Test that exception_cleanup is called
        when exiting catch block without rethrowing.
        * g++.dg/eh/forced3.C: New.
        * g++.dg/eh/forced4.C: New.

libstdc++-v3/
        * libsupc++/eh_catch.cc (__cxa_begin_catch): Handle foreign exceptions.
        (__cxa_end_catch): Likewise.
        * libsupc++/eh_throw.cc (__cxa_rethrow): Likewise.  Use
        _Unwind_Resume_or_Rethrow.
        * libsupc++/eh_personality.cc (empty_exception_spec): New.
        (PERSONALITY_FUNCTION): Don't ignore terminate or catch-all
        for _UA_FORCE_UNWIND.  Honor empty filter spec for foreign
        exceptions.  Don't push terminate/unexpected to cxa functions.
        (__cxa_call_unexpected): Remove foreign exception fixmes.

From-SVN: r66583
2003-05-07 15:11:38 -07:00
Benjamin Kosnik 7968097540 cons: New.
2003-05-07  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_base/cons: New.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: New.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: New.

From-SVN: r66580
2003-05-07 21:27:29 +00:00
Paolo Carlini cd96b185c5 std_fstream.h (_M_is_indeterminate): Remove.
2003-05-07  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_fstream.h (_M_is_indeterminate): Remove.
	* src/fstream.cc
	(basic_filebuf<char/wchar_t>::_M_underflow): Simplify: either
	there is no buffer or __testget == !__testinit.

	* src/fstream.cc
	(basic_filebuf<char/wchar_t>::_M_underflow): _M_set_determinate()
	automatically sets, if appropriate, _M_out_cur == _M_in_cur.

	* include/std/std_fstream.h (_M_destroy_pback): Don't set
	unnecessarily _M_pback_cur_save and _M_pback_end_save.

	* include/std/std_fstream.h (_M_set_determinate): Minor tweak.

	* include/std/std_sstream.h (_M_sync): Minor tweak.

	* include/bits/fstream.tcc (close): No need to call
	_M_destroy_pback, setting _M_pback_init to false suffices
	to clean up.

From-SVN: r66557
2003-05-07 12:48:58 +00:00
Benjamin Kosnik 655d78212b stl_algo.h: Enums as _S_.
2003-05-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_algo.h: Enums as _S_.
	* include/bits/stl_tree.h: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/ios_base.h: Same.
	* include/bits/stl_alloc.h: Same.
	* include/ext/stl_hashtable.h: Same.
	* src/ios.cc: And here.

	* include/std/std_sstream.h: Replace _M_really_sync to _M_sync.
	* include/bits/sstream.tcc: Same.

        * include/bits/basic_ios.h: Correct spacing for '< ctype'.

	* include/bits/locale_facets.tcc: Replace __temp to __tmp.

	* include/bits/locale_facets.h (__num_base): Remove protected.
	Use _S_[io]* names for enumerations.
	(_S_format_int): Remove.
	* include/bits/locale_facets.tcc: Same.
	* src/locale.cc: Same.

	* include/std/std_sstream.h (stringbuf::str): Tweak formatting.

From-SVN: r66552
2003-05-07 05:01:59 +00:00
Phil Edwards fa587f4c93 index.html (3.10): Add note about mips atomicity.h.
2003-05-06  Phil Edwards  <pme@gcc.gnu.org>

	* docs/html/faq/index.html (3.10):  Add note about mips atomicity.h.
	* docs/html/faq/index.txt:  Regenerated.

From-SVN: r66536
2003-05-06 22:23:25 +00:00
Michael Ritzert b7c4cd53ab And retweak.
Co-Authored-By: Matt Kraai <kraai@alumni.cmu.edu>

From-SVN: r66530
2003-05-06 19:31:39 +00:00
Michael Ritzert 3612c9efbb * include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): Tweak.
From-SVN: r66523
2003-05-06 14:32:52 +00:00
Richard Sandiford 92d568f2ca * configure.target (mips*): Use the generic atomicity.h by default.
From-SVN: r66517
2003-05-06 07:01:25 +00:00
Loren J. Rittle 1976f0d995 stl_threads.h (_Atomic_swap): Kill it...
* include/bits/stl_threads.h (_Atomic_swap): Kill it...
	(_Swap_lock_struct<>): ...and the horse it rode in on.
	* src/globals.cc (_Swap_lock_struct<>): Likewise.
	* include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): New
	member to support...
	* include/ext/ropeimpl.h (rope<>::c_str): Follow *all* memory
	visibility rules related to POSIX threads.
	* testsuite/thread/pthread7-rope.cc: New test.

From-SVN: r66507
2003-05-05 22:28:16 +00:00
Paolo Carlini 85819f7c33 3.cc: New file, testing basic_string<char>::find_first_not_of.
2003-05-04  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/basic_string/find/char/3.cc: New
	file, testing basic_string<char>::find_first_not_of.
	* testsuite/21_strings/basic_string/find/wchar_t/3.cc:
	Likewise for basic_string<wchar_t>.

From-SVN: r66466
2003-05-04 22:12:18 +00:00
Loren J. Rittle d4c67b6ee3 * testsuite/thread/pthread1.cc: Remove special case for FreeBSD.
From-SVN: r66418
2003-05-03 07:42:22 +00:00
Benjamin Kosnik 53c2acdf21 Makefile.am (CLEANFILES): Remove PCH files in target directory.
2003-05-02  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (CLEANFILES): Remove PCH files in target
	directory.
	* include/Makefile.in: Regenerate.

From-SVN: r66403
2003-05-02 23:18:09 +00:00
Paolo Carlini 4571fbb1ec std_sstream.h (str()): Tidy.
2003-05-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (str()): Tidy.

From-SVN: r66402
2003-05-02 23:02:03 +00:00
Nathan Myers 0992fb51ae streambuf.tcc (__copy_streambufs): Rewrote.
2003-05-02  Nathan Myers  <ncm@cantrip.org>
	    Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/streambuf.tcc (__copy_streambufs): Rewrote.

Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>

From-SVN: r66395
2003-05-02 18:35:24 +00:00
Jonathan Wakely 8515a6007c basic_string.h (swap): Remove redundant template parameters from declaration of non-template member...
2003-05-02  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/bits/basic_string.h (swap): Remove redundant template
	parameters from declaration of non-template member function.

From-SVN: r66389
2003-05-02 16:50:53 +01:00
Phil Edwards c67528fe19 acconfig.h (_GLIBCPP_USE_NLS): New symbol.
2003-05-01  Phil Edwards  <pme@gcc.gnu.org>

	* acconfig.h (_GLIBCPP_USE_NLS):  New symbol.
	* configure.in:  Move libintl.h header test...
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE):  ...to here.  Gather all
	the NLS-related test results into one symbol.
	* src/functexcept.cc:  Use it here.
	* aclocal.m4, config.h.in, configure:  Regenerated.

From-SVN: r66372
2003-05-02 02:53:28 +00:00
Paolo Carlini 74843551df sstream.tcc (overflow): Instead of calling str()...
2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (overflow): Instead of calling
	str(), then _M_string.reserve, thus copying the contents
	of the current buffer two times, just copy the latter in
	a temporary, then use the 'swap trick'.

From-SVN: r66358
2003-05-02 00:14:49 +00:00
Paolo Carlini e70b1b7788 std_sstream.h (str()): Revert the best of the previous 'improvement'...
2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (str()): Revert the best of the
	previous 'improvement', incorrect due to the COW nature of
	v3 basic_string; simplify.

From-SVN: r66357
2003-05-01 23:20:33 +00:00
Paolo Carlini f4731b64d2 streambuf.tcc (__copy_streambufs): Adjust the type of __avail to ptrdiff_t to avoid signed-unsigned warning.
2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/streambuf.tcc (__copy_streambufs): Adjust the
	type of __avail to ptrdiff_t to avoid signed-unsigned warning.

From-SVN: r66356
2003-05-01 22:53:13 +00:00
Benjamin Kosnik e78d8df476 abi_check.cc (check_version): Update known versions.
2003-05-01  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/abi_check.cc (check_version): Update known versions.
	Check added symbols for version_name != base version. Add missing
	symbols to incompatible list.

From-SVN: r66352
2003-05-01 22:17:23 +00:00
Benjamin Kosnik 947bd823aa acinclude.m4 (GLIBCPP_EXPORT_FLAGS): Remove -Winline.
2003-05-01  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_EXPORT_FLAGS): Remove -Winline.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.

From-SVN: r66345
2003-05-01 20:19:18 +00:00
Paolo Carlini 397751aef0 streambuf.tcc (basic_streambuf::xsgetn): Const-ify some variables.
2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/streambuf.tcc (basic_streambuf::xsgetn):
	Const-ify some variables.
	(basic_streambuf::xsputn): Likewise; change the type of some
	variables to size_t.
	(__copy_streambufs): Change some variables to size_t.

2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (str()): Avoid constructing
	a basic_string temporary not only when it would turn out
	to be zero-sized but also when identical to the current
	_M_string buffer.

From-SVN: r66334
2003-05-01 16:45:50 +00:00
Paolo Carlini 8544261c53 stdio_filebuf.h (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), [...]): Shorten a bit (-10 lines) by factoring out some code.
2003-05-01  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/stdio_filebuf.h
	(stdio_filebuf(int, std::ios_base::openmode, bool, size_t),
	stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t)):
	Shorten a bit (-10 lines) by factoring out some code.

From-SVN: r66320
2003-05-01 08:41:59 +00:00
Phil Edwards 8abcca7bc6 acinclude.m4: Add bit missing from previous patch.
2003-04-30  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Add bit missing from previous patch.
	* aclocal.m4, configure:  Regenerated.

From-SVN: r66299
2003-04-30 18:04:23 +00:00
Phil Edwards e1bff39ade mainpage.html: Bring up to date.
2003-04-29  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/mainpage.html:  Bring up to date.
	* docs/doxygen/run_doxygen:  Cosmetic tweaks.  Work around a bug
	in Doxygen.
	* docs/doxygen/user.cfg.in:  Scanning the precompiled headers
	breaks everything.  Don't scan them.
	* docs/html/documentation.html:  Point to "Write after approval"
	notes.

From-SVN: r66270
2003-04-29 23:48:52 +00:00
Phil Edwards 7f78b6caa0 acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Search for gettext outside of libc if message translations are being used.
2003-04-29  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE):  Search for gettext outside
	of libc if message translations are being used.  Fix info text in
	xieee_1003.1-2001 case.
	* aclocal.m4, configure:  Regenerate.

From-SVN: r66267
2003-04-29 22:47:03 +00:00
Joel Sherrill 51dc3d74f8 atomicity.h: New file.
2003-04-29 Joel Sherrill  <joel.sherrill@OARcorp.com>
	   Loren J. Rittle <ljrittle@acm.org>
	   Martin v. Loewis  <martin@v.loewis.de>

	* config/cpu/i386/atomicity.h: New file.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>
Co-Authored-By: Martin v. Loewis <martin@v.loewis.de>

From-SVN: r66261
2003-04-29 21:57:39 +00:00
Paolo Carlini cc9d1c78ef fstream.tcc (open): Change to single return.
2003-04-29  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (open): Change to single return.

From-SVN: r66245
2003-04-29 19:46:07 +00:00
Paolo Carlini d4be2966f3 std_sstream.h (underflow): Change to single return.
2003-04-29  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (underflow): Change to single return.

From-SVN: r66234
2003-04-29 17:47:38 +00:00
Paolo Carlini 479a181108 std_streambuf.h (_M_buf): is currently used only for basic_filebuf, therefore move it there.
2003-04-28  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (_M_buf): is currently
	used only for basic_filebuf, therefore move it there.
	(basic_streambuf(), ~basic_streambuf()): Adjust.
	* include/std/std_fstream.h (_M_buf): Moved here.
	* include/std/std_sstream.h (setbuf): Don't set _M_buf,
	is actually redundant for basic_stringbuf.
	(_M_really_sync): Likewise.
	* include/bits/fstream.tcc (basic_filebuf()): Adjust.
	* include/bits/sstream.tcc (seekoff): Adjust.

From-SVN: r66193
2003-04-28 23:51:37 +00:00
Benjamin Kosnik 988ad90d00 localename.cc: Standardize exception strings.
2003-04-28  Benjamin Kosnik  <bkoz@redhat.com>

	* src/localename.cc: Standardize exception strings.
	* src/locale.cc: Same.
	* src/ios.cc: Same.
	* include/bits/basic_string.tcc: Same.
	* include/bits/basic_ios.tcc: Same.
	* include/std/std_bitset.h: Same.
	* include/ext/ropeimpl.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_bvector.h: Same.
	* config/locale/generic/c_locale.cc: Same.
	* config/locale/gnu/c_locale.cc: Same.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.

	* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Modify.

From-SVN: r66192
2003-04-28 23:05:57 +00:00
Paolo Carlini 6ef4b79c95 std_streambuf.h (_M_buf_size): is currently used only for basic_filebuf, therefore move it there.
2003-04-28  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (_M_buf_size): is currently
	used only for basic_filebuf, therefore move it there.
	(basic_streambuf(), ~basic_streambuf()): Adjust.
	* include/std/std_fstream.h (_M_buf_size): Moved here.
	* include/bits/fstream.tcc (basic_filebuf()): Adjust.

From-SVN: r66191
2003-04-28 23:02:46 +00:00
Paolo Carlini 44b84cc918 streambuf.tcc (__copy_streambufs): Don't use _M_buf_size (synced input is now correctly dealt with elsewhere)...
2003-04-28  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/streambuf.tcc (__copy_streambufs): Don't use
	_M_buf_size (synced input is now correctly dealt with
	elsewhere); when the output buffer is full don't fall back
	to a snextc-sputc loop, call overflow instead.

From-SVN: r66190
2003-04-28 22:15:58 +00:00
Paolo Carlini ca78f36ae3 sstream.tcc (pbackfail): Shorten a bit (6 lines) the innermost 'if' by factoring out some code.
2003-04-28  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (pbackfail): Shorten a bit (6 lines)
	the innermost 'if' by factoring out some code.

From-SVN: r66187
2003-04-28 21:28:25 +00:00
Phil Edwards ad41429085 configure.in: Test for libintl.h.
2003-04-28  Phil Edwards  <pme@gcc.gnu.org>

	* configure.in:  Test for libintl.h.
	* include/bits/c++config:  Define __N for everybody.
	* include/bits/basic_string.h, include/bits/stl_bvector.h,
	include/bits/stl_deque.h, include/bits/stl_vector.h,
	include/std/std_bitset.h:  Wrap all __throw* text with __N.
	* po/Makefile.am (pot):  New rule, mostly working.
	* src/functexcept.cc:  Call gettext on all __throw* arguments when
	-fexceptions is in effect.
	* po/Makefile.in, config.h.in, configure:  Regenerate.

From-SVN: r66185
2003-04-28 21:03:19 +00:00
Benjamin Kosnik 2aacd7357a [multiple changes]
2003-04-28  Petur Runolfsson  <peturr02@ru.is>

        PR libstdc++/9523
        * include/bits/ios_base.h (Init::_S_ios_create,
        Init::_S_ios_destroy):  Remove declarations.
        (Init::_S_create_buffers,
        Init::_S_destroy_buffers):  Declare
        * src/ios.cc (Init::_S_ios_create):  Remove
        (Init::_S_create_buffers):  Create buffers and add to streams.
        (Init::_S_ios_destroy):  Rename to...
        (Init::_S_destroy_buffers):  this.
        (Init::Init):  Only construct streams once.
        (Init::~Init):  Flush streams, don't destroy them.
        (ios_base::sync_with_stdio):  Don't destroy streams, only buffers.
        * testsuite/27_io/ios_base/sync_with_stdio/9523.cc:  New test.
        * testsuite/27_io/objects/char/5.cc:  New test.
        * testsuite/27_io/objects/char/5268.cc:  Avoid undefined behavior.
        * testsuite/27_io/objects/char/6.cc:  New test.
        * testsuite/27_io/objects/char/7.cc:  New test.

2003-04-28  Benjamin Kosnik  <bkoz@redhat.com>

        * testsuite/27_io/objects/char/8.cc:  New test.

From-SVN: r66177
2003-04-28 17:15:03 +00:00
Benjamin Kosnik af77916931 char.cc: Remove bom usage.
2003-04-28  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/codecvt/unicode/char.cc: Remove bom usage.
	* testsuite/22_locale/codecvt/unicode/wchar_t.cc: Same.

From-SVN: r66170
2003-04-28 14:30:07 +00:00