Commit Graph

2909 Commits

Author SHA1 Message Date
Jan van Dijk 9ef313e31c std_complex.h (sin(const complex<_Tp>& __z)): Make this function return a value.
2004-06-10  Jan van Dijk  <jan@etpmod.phys.tue.nl>

	* include/std/std_complex.h (sin(const complex<_Tp>& __z)): Make
	this function return a value.

From-SVN: r82928
2004-06-10 16:54:49 +00:00
Paolo Carlini 7338fc64dd re PR libstdc++/15775 (Allocator::pointer consistently ignored)
2004-06-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/15775
	* include/bits/stl_deque.h: Consistently with stl_set.h, define
	pointer as allocator's pointer, likewise for reference,
	const_pointer, and const_reference.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_vector.h: Likewise.

From-SVN: r82857
2004-06-09 21:37:46 +00:00
Benjamin Kosnik 92efec6ec5 crossconfig.m4: Remove signbit, signbitf, signbitl.
2004-06-09  Benjamin Kosnik  <bkoz@redhat.com>

	* crossconfig.m4: Remove signbit, signbitf, signbitl.
	* linkage.m4: Comment LIBMATHOBJS, tweak others.  AC_DEFINES for
	builtin math functions instead of AC_DEFINE_UNQUOTED.
	* configure: Regenerate.

From-SVN: r82815
2004-06-09 07:26:28 +00:00
Benjamin Kosnik 57ffad2ba3 filter.sed: Rename _GLIBCXX_STD to std.
2004-06-08  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/doxygen/filter.sed: Rename _GLIBCXX_STD to std.
	* docs/doxygen/mainpage.html: Remove links.

From-SVN: r82814
2004-06-09 06:09:17 +00:00
Jason Merrill 37f3105a58 linker-map.gnu: Use wildcards for __basic_file::{xsgetn,xsputn,seekoff,xsputn_2}.
* config/linker-map.gnu: Use wildcards for
        __basic_file::{xsgetn,xsputn,seekoff,xsputn_2}.

From-SVN: r82813
2004-06-08 23:56:34 -04:00
Paolo Carlini 5f1a5ede6c pool_allocator.h: Convert to a global free-list, as per the original SGI/HP design...
2004-06-08  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/pool_allocator.h: Convert to a global free-list,
	as per the original SGI/HP design: move the implementation
	details to struct __pool_base, from which __pool_alloc derives.
	* src/allocator.cc: Instantiate __pool_base.

From-SVN: r82794
2004-06-08 22:19:18 +00:00
Dhruv Matani 345b912f50 2004-06-07 Dhruv Matani <dhruvbird@gmx.net>
Paolo Carlini  <pcarlini@suse.de>

	* testsuite/testsuite_performance.h
	(resource_counter::allocated_memory): Make it return the right
	number of bytes requested by the allocators/application. This is
	the sbrk+mmaped memory.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r82725
2004-06-07 21:56:16 +00:00
Gabriel Dos Reis b53dcf3e5c * include/std/std_complex.h (log): Tidy.
From-SVN: r82584
2004-06-02 21:04:07 +00:00
Benjamin Kosnik 7c9fee34e5 linker-map.gnu (GLIBCXX_3.4.1): Add.
2004-05-31  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu (GLIBCXX_3.4.1): Add.
	* testsuite/testsuite_abi.cc: Same.
	* configure.ac (libtool_VERSION): Bump to 6:1:0.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r82498
2004-05-31 21:19:52 +00:00
Gabriel Dos Reis a4ddde0dee std_complex.h (complex<_Tp>): Properly indent to follow C++STYLE.
* include/std/std_complex.h (complex<_Tp>): Properly indent
	to follow C++STYLE.
	(complex<>::__rep): New.
	(__complex_abs): New.  Dispatch to built-ins.
	(abs): Use them.
	(__complex_arg): New. Dispatch to built-ins.
	(arg): Use it.
	(__complex_cos): New. Dispatch to built-ins.
	(cos): Use it.
	(__complex_cosh): New. Dispatch to built-ins.
	(cosh): Use it.
	(__complex_exp): New. Dispatch to built-ins.
	(exp): Use it.
	(__complex_log): New. Dispatch to built-ins.
	(log): Use it.
	(__complex_sin): New. Dispatch to built-ins.
	(sin): Use it.
	(__complex_sinh): New. Dispatch to built-ins.
	(sinh): Use it.
	(__complex_sqrt): New. Dispatch to built-ins.
	(sqrt): Use it.
	(__complex_tan): New. Dispatch to built-ins.
	(tan): Use it.
	(__complex_tanh): New. Dispatch to built-ins.
	(tanh): Use it.
	(__complex_pow): New. Dispatch to built-ins.
	(pow): Use it.

From-SVN: r82453
2004-05-30 14:41:39 +00:00
Richard B. Kreckel 803cb0b5c9 re PR libstdc++/14600 (__gnu_cxx::stdio_sync_filebuf should expose internal FILE*)
2004-05-29  Richard B. Kreckel  <Richard.Kreckel@Framatome-ANP.com>
            Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/14600
	* include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): New.
	* include/ext/stdio_filebuf.h (stdio_filebuf::file): New.
	* config/io/basic_file_stdio.cc (__basic_file::file): New.
	* config/io/basic_file_stdio.h: Define.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r82419
2004-05-29 14:40:59 +00:00
Benjamin Kosnik e8a382b780 re PR libstdc++/15675 (Doxygen graph are invalid in the libstdc++-v3 online docs)
2004-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15675
	* docs/html/documentation.html: Update doxygen links for 3.4.0.

From-SVN: r82355
2004-05-28 04:25:18 +00:00
Jan Beulich a9c70186f4 create_testsuite_files: Tweak.
2004-05-27  Jan Beulich  <jbeulich@novell.com>

	* scripts/create_testsuite_files: Tweak.

From-SVN: r82354
2004-05-28 04:21:50 +00:00
Benjamin Kosnik 9874adaf91 re PR libstdc++/15489 (testsuite_files determined incorrectly)
2004-05-25  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15489
	* scripts/create_testsuite_files: Revert xtype change, add non-GNU
	bits to do the same thing.

From-SVN: r82250
2004-05-25 17:53:00 +00:00
Paolo Carlini b1c5b5a09b istream.tcc (ignore): Correctly deal with n == numeric_limits<streamsize>::max().
2004-05-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (ignore): Correctly deal with
	n == numeric_limits<streamsize>::max().
	* testsuite/27_io/basic_istream/ignore/char/2.cc: New.

	* include/bits/istream.tcc (basic_istream<>::getline): Prefer
	'_M_gcount + 1 < __n' to '--__n; _M_gcount < __n', just in case
	__n == numeric_limits<>::min().

	* include/bits/istream.tcc: Minor tweaks.

	* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
	Tighten.
	* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
	Likewise.
	* testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.

From-SVN: r82198
2004-05-24 09:40:56 +00:00
Benjamin Kosnik 26c691a88b re PR libstdc++/12854 (libstdc++ vs. -Weffc++)
2004-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12854
	Fixups for -Weffc++.
	* include/bits/basic_string.h (basic_string::operator=): Return
	pointer to this instead of result of assign. Although redundant,
	this doesn't impact resultant codegen.

	* include/bits/locale_facets.h (__numpunct_cache): Declare
	assignment opxserator and copy constructor private.
	(__timepunct_cache): Same.
	(__moneypunct_cache): Same.
	(collate): Use member initialization list for _M_c_locale_collate.
	* config/locale/gnu/messages_members.h: Same.
	* config/locale/gnu/time_members.h (__timepunct): Same.
	* src/codecvt.cc: Use member initialization list to initialize
	_M_c_locale_codecvt.
	* src/ctype.cc: Same, with _M_c_locale_ctype and _M_narrow_ok.
	* config/os/gnu-linux/ctype_noninline.h: Same.
	* src/locale.cc (_Impl): Same.
	* src/locale_init.cc: Same.
	* src/localename.cc: Same.

	* include/bits/basic_ios.h (basic_ios): Complete member
	initialization list.
	* include/bits/istream.tcc (basic_istream::sentry): Same.
	* include/bits/ostream.tcc (basic_ostream::sentry): Same.
	* include/bits/fstream.tcc (basic_filebuf): Add _M_lock and
	_M_pback to member initialization list.
	* include/std/std_streambuf.h: Same.
	* include/std/std_sstream.h: Same, for _M_mode.
	* src/ios.cc (ios_base): Same.

	* include/ext/rope: Make derived classes match exception

	 specifications. Add copy constructors and assignment operators.

	* include/debug/safe_base.h (_Safe_sequence_base): Declare copy
	constructor and assignment operator protected.
	(_Safe_iterator_base): Same.
	* include/debug/formatter.h (_Error_formatter): Define copy
	constructor and assignment operator.

	* include/backward/strstream: Declare assignment operator and copy
	constructor private.

From-SVN: r82153
2004-05-22 23:46:34 +00:00
Benjamin Kosnik f4a1faa55f testsuite_hooks.h (func_callback): Declare copy constructor and assignment operator private.
2004-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_hooks.h (func_callback): Declare copy
	constructor and assignment operator private.
	* testsuite/23_containers/deque/cons/clear_allocator.cc: Match
	exception specifications of base class.
	* testsuite/23_containers/list/cons/clear_allocator.cc: Same.
	* testsuite/23_containers/vector/cons/clear_allocator.cc: Same.
	* testsuite/23_containers/vector/bool/clear_allocator.cc: New.

From-SVN: r82150
2004-05-22 21:51:07 +00:00
Benjamin Kosnik 52ceb03971 cxxabi.h: Remove duplicated and useless public and private keywords in class declarations.
2004-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/cxxabi.h: Remove duplicated and useless public and
        private keywords in class declarations. Format. Use
        stddef.h. Expose declarations to "C" compilation.
        * libsupc++/tinfo.cc (__upcast_result): Add copy constructor and
        assignment operator.
        (__dyncast_result): Same.
        * libsupc++/vec.cc (uncatch_exception): Same, use member
        initialization list.

From-SVN: r82147
2004-05-22 21:07:28 +00:00
Benjamin Kosnik 6ad70bf28a abi_check.cc: Add unistd.h.
2004-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/abi_check.cc: Add unistd.h.

From-SVN: r82137
2004-05-22 17:08:02 +00:00
Paolo Carlini fea6ecb746 re PR libstdc++/15565 ([3.4 only] SLES9: leading + sign for unsigned int with showpos)
2004-05-22  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/15565
	* include/bits/locale_facets.tcc (__int_to_char(unsigned long),
	__int_to_char(unsigned long long)): Showpos is not relevant
	for unsigned types.
	* testsuite/22_locale/num_put/put/char/15565.cc: New.
	* testsuite/22_locale/num_put/put/wchar_t/15565.cc: New.

	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Use L for the fill
	char.
	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/8.cc: Likewise.

From-SVN: r82128
2004-05-22 09:02:56 +00:00
Matthias Klose 2461ecbe6c run_doxygen: Bump required version.
2004-05-21  Matthias Klose  <doko@debian.org>

	* docs/doxygen/run_doxygen:  Bump required version.

From-SVN: r82125
2004-05-22 07:07:01 +00:00
Benjamin Kosnik a3e14d3983 abi.html (libgcc_s): Additions suggested by Matthias Klose.
2004-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/abi.html (libgcc_s): Additions suggested by Matthias Klose.
	* docs/doxygen/Intro.3: Subtractions suggested by Phil Edwards.

From-SVN: r82122
2004-05-22 05:01:36 +00:00
Paolo Carlini 32da620821 istream.tcc (ignore): Remove redundant line.
2004-05-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (ignore): Remove redundant line.
	(readsome): Tidy, closely following 27.6.1.3, p30.

From-SVN: r82103
2004-05-21 17:16:21 +00:00
Paolo Carlini 3adf6cadbb istream.tcc (operator>>(basic_istream<>&, basic_string<>&)): Use a temporary buffer, thus avoiding reallocation for common case.
2004-05-20  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (operator>>(basic_istream<>&,
	basic_string<>&)): Use a temporary buffer, thus avoiding
	reallocation for common case.
	* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
	New.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
	Likewise.

	* include/bits/istream.tcc: Const-ification of a few variables.

	* include/bits/ostream.tcc: Trivial formatting fixes and
	const-ification of some variables.

From-SVN: r82070
2004-05-20 22:06:40 +00:00
Benjamin Kosnik 66fda8b2e6 re PR libstdc++/15123 (libstdc++-doc: Allocators.3 manpage is empty)
2004-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15123
	PR libstdc++/13928
	* docs/doxygen/Intro.3: Remove Allocators.3.
	Add new extension headers, extension namespace list.
	* docs/doxygen/run_doxygen (problematic): Remove Allocators.3
	Rename GLIBCXXSTD names to std::. Rename __gnu_debug to
	__gnu_debug::. Remove __policy_ renames.
	* docs/doxygen/guide.html: Add dot note.
	* docs/doxygen/stdheader.cc: Edit, add files.
	* docs/doxygen/user.cfg.in: Regenerate with Doxygen 1.3.7.

From-SVN: r82066
2004-05-20 18:52:09 +00:00
Jonathan Wakely c6618c0336 re PR libstdc++/11691 (stdio_filebuf leaks FILE buffer when "no close" is requested)
2004-05-18  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/ext/stdio_filebuf.h: Update comments to reflect PR 11691.

From-SVN: r82019
2004-05-19 09:31:07 +01:00
Jan Beulich b79634e3d8 re PR libstdc++/15489 (testsuite_files determined incorrectly)
2004-05-18  Jan Beulich  <jbeulich@novell.com>

        PR libstdc++/15489
        * scripts/create_testsuite_files: Also find source files through
          symbolic links.

2004-05-18  Jan Beulich  <jbeulich@novell.com>

	PR libstdc++/15488
	* testsuite/lib/libstdc++.exp: Make test files writable.

From-SVN: r82002
2004-05-18 18:42:27 +00:00
Paolo Carlini 2ab20654a2 [multiple changes]
2004-05-18  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h:(__mt_alloc::allocate): Minor
	tweaks.

2004-05-18  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/mt_allocator.h:(__mt_alloc::allocate): Re-write
	allocation loop which removes blocks from the global free list
	from O(N) to O(1) when the required blocks are <= the number
	available.

From-SVN: r81992
2004-05-18 15:58:33 +00:00
Jonathan Wakely 319da9da6b enc_filebuf.h: Move concept-check macro to class scope.
2004-05-18  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/ext/enc_filebuf.h: Move concept-check macro to class scope.

From-SVN: r81978
2004-05-18 10:09:39 +01:00
Benjamin Kosnik 261e5b9e6a [multiple changes]
2004-05-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_hooks.h (__gnu_test::conversion): New class.
	* testsuite/23_containers/deque/14340.cc: New.
	* testsuite/23_containers/list/14340.cc: New.
	* testsuite/23_containers/map/14340.cc: New.
	* testsuite/23_containers/multimap/14340.cc: New.
	* testsuite/23_containers/multiset/14340.cc: New.
	* testsuite/23_containers/set/14340.cc: New.
	* testsuite/23_containers/vector/14340.cc: New.

2004-05-17  Douglas Gregor   <gregod@cs.rpi.edu>

	PR libstdc++/14340
	* include/debug/safe_iterator.h (_Safe_iterator converting
	constructor): Only allow declaration to instantiate when the
	incoming _Safe_iterator has exactly the right iterator type.

From-SVN: r81970
2004-05-18 03:27:57 +00:00
Jonathan Wakely b2342b5484 boost_concept_check.h: Fix old attribute syntax.
2004-05-17  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/bits/boost_concept_check.h: Fix old attribute syntax.
	* testsuite/23_containers/map/modifiers/swap.cc: Define operator<
	to pass concept-checks.
	* testsuite/23_containers/multimap/modifiers/swap.cc: Same.
	* testsuite/23_containers/set/modifiers/swap.cc: Same.
	* testsuite/23_containers/multiset/modifiers/swap.cc: Same.

From-SVN: r81953
2004-05-17 22:56:18 +01:00
Paolo Carlini 5a4db26d01 std_bitset.h: Minor formatting fixes.
2004-05-16  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_bitset.h: Minor formatting fixes.

From-SVN: r81917
2004-05-16 17:45:29 +00:00
Paolo Carlini 08f7c2eb78 mt_allocator.h (__mt_alloc<>::deallocate): Consistently update __bin._M_free[0].
2004-05-16  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	Consistently update __bin._M_free[0].
	(__mt_alloc<>::allocate): When __bin._M_first[0] != NULL use
	__bin._M_free[0] to simplify the while loop (i.e., the number
	of iterations becomes known at the outset).

From-SVN: r81916
2004-05-16 17:01:40 +00:00
Paolo Carlini 5c33bb6218 std_bitset.h: Trivial formatting fixes.
2004-05-15  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_bitset.h: Trivial formatting fixes.

From-SVN: r81878
2004-05-15 11:43:03 +00:00
Paolo Carlini 394ef95eaf re PR libstdc++/15361 (bitset<>::_Find_next fails)
2004-05-14  Paolo Carlini  <pcarlini@suse.de>
	    Ivan Godard  <igodard@pacbell.net>

	PR libstdc++/15361
	* include/std/std_bitset.h (_Base_bitset<_Nw>::_M_do_find_next): Fix.
	* testsuite/23_containers/bitset/ext/15361.cc: New.

Co-Authored-By: Ivan Godard <igodard@pacbell.net>

From-SVN: r81852
2004-05-14 17:01:49 +00:00
Benjamin Kosnik 7549d7f202 re PR libstdc++/15046 (Math functions misdetected by cross configuration)
2004-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15046
	* crossconfig.m4: Add C99 math bits for linux crosses.
	* configure: Regenerate.

From-SVN: r81797
2004-05-13 17:49:42 +00:00
Simon Marshall 95b147fe4a re PR libstdc++/15090 (-fno-for-scope vs. libstdc++)
2004-05-13  Simon Marshall <simon.marshall@misys.com>
	    Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15090
	* include/bits/locale_facets.h: Fix for -fno-for-scope.
	* include/debug/safe_sequence.h: Same.
	* include/debug/safe_iterator.tcc: Same.
	* src/debug.cc: Same.
	* src/locale.cc: Same.
	* src/locale_init.cc: Same.
	* src/localename.cc: Same.
	* config/locale/gnu/ctype_members.cc: Same.
	* config/locale/gnu/numeric_members.cc: Same.
	* testsuite/testsuite_abi.cc: Same.
	* testsuite/testsuite_hooks.cc: Same.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r81795
2004-05-13 16:29:39 +00:00
Jonathan Wakely d7f3083354 abi.html: Document effect of -fabi-version on value of __GXX_ABI_VERSION...
2004-05-13  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/abi.html: Document effect of -fabi-version on value
	of __GXX_ABI_VERSION, and that it's defined in c-cppbuiltin.c.
	Fix markup.

From-SVN: r81794
2004-05-13 16:50:02 +01:00
Benjamin Kosnik 4b351c6ee8 re PR libstdc++/15074 (g++ -lsupc++ still links against libstdc++)
2004-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15074
	* docs/html/faq/index.html: Update docs for libsupc++ usage.

From-SVN: r81786
2004-05-13 15:14:07 +00:00
Benjamin Kosnik 5c61a86377 re PR libstdc++/15412 (_GLIBCXX_ symbols symbols defined and used in different namespaces)
2004-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15412
	* include/bits/stl_threads.h (_GLIBCXX_mutex): Move to namespace
	__gnu_internal.
	(_GLIBCXX_mutex_address): Same.
	(_GLIBCXX_once): Same.
	(_GLIBCXX_mutex_init): Same.
	(_GLIBCXX_mutex_address_init): Same.

From-SVN: r81785
2004-05-13 14:54:24 +00:00
Benjamin Kosnik 4b260c2013 abi.html: New.
2004-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/abi.html: New.
	* docs/html/abi.txt: Remove.
	* docs/html/documentation.html: Add link.
	* testsuite/Makefile.am: Add files.
	* testsuite/Makefile.in: Regenerated.
	* testsuite/abi_check.cc: Move and modify code into...
	* testsuite/testsuite_abi.cc: Add.
	* testsuite/testsuite_abi.h: Add.

	* docs/html/17_intro/TODO: Update.
	* include/bits/stl_pair.h: Format.

From-SVN: r81781
2004-05-13 12:50:53 +00:00
Matthias Klose ce120bb2c4 iterator.h: Add GPL copyright info, with exception clause.
2004-05-06  Matthias Klose  <doko@debian.org>

        * include/backward/iterator.h:  Add GPL copyright info,
        with exception clause.
        * include/bits/boost_concept_check.h: Likewise.
        * include
        * libsupc++/tinfo.h: Likewise.
        * po/string_literals.cc: Likewise.

From-SVN: r81581
2004-05-06 22:02:05 +00:00
Andreas Tobler dc7c62aea4 acinclude.m4: Replace -W with more speaking -Wextra.
2004-05-03  Andreas Tobler  <a.tobler@schweiz.ch>

	* acinclude.m4: Replace -W with more speaking -Wextra.
	* configure: Rebuilt.

From-SVN: r81444
2004-05-03 21:07:49 +02:00
Paolo Carlini 4df9c41de5 Optimize locale::_M_impl->_M_names for the most common cases...
2004-05-03  Paolo Carlini  <pcarlini@suse.de>

	Optimize locale::_M_impl->_M_names for the most common cases:
	!_M_names[0] means unnamed; !_M_names[1] means all the categories
	the same name (_M_names[0] && _M_names[1] means that the full set
	of _M_names must be processed, the general case).
	* include/bits/locale_classes.h (locale::_Impl::_M_check_same_name):
	Tweak, saving work when !_M_names[1].
	(locale::locale(const locale&, _Facet*): Simplify: now just setting
	_M_names[0] = 0 means unnamed.
	* src/locale.cc (locale::operator==): Deal first with the common,
	easy cases, otherwise fall back to locale::name().
	(locale::name()): Tweak, if !_M_names[0] just return "*".
	(locale::_Impl::_Impl(const _Impl&, size_t): Tweak, early stop
	copying __imp._M_names if !__imp._M_names[0] or !__imp._M_names[1].
	* src/locale_init.cc (locale::_Impl::_Impl(size_t)): Tweak.
	* src/localename.cc (locale::_Impl::_Impl(const char*, size_t):
	Simplify when !std::strchr, just updating _M_names[0]; clean up.
	(locale::_Impl::_M_replace_categories): When !_M_names[1] prepare
	for the general case (full set of names), then do the usual work;
	clean up.

	* src/locale.cc (locale::name()): Reserve space in __ret.
	* src/locale_init.cc (locale::global(const locale&)): Save
	the name in a temporary.
	* src/localename.cc (locale::locale(const char*)): Reserve space
	in __str.

From-SVN: r81430
2004-05-03 12:14:07 +00:00
Paolo Carlini 5963910694 locale.cc (locale::operator==): Always avoid constructing locale::name(), directly compare pairs of _M_names.
2004-04-29  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::operator==): Always avoid constructing
	locale::name(), directly compare pairs of _M_names.

From-SVN: r81309
2004-04-29 22:07:13 +00:00
Paolo Carlini 479864fe80 istream.tcc: Fix comment.
2004-04-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc: Fix comment.

From-SVN: r81193
2004-04-26 15:26:18 +00:00
Paolo Carlini 874e7baa4c stl_vector.h: Trivial formatting fixes.
2004-04-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_vector.h: Trivial formatting fixes.
	* include/bits/vector.tcc: Likewise.

From-SVN: r81178
2004-04-26 09:02:43 +00:00
Paolo Carlini 247791f5d1 PR libstdc++/15002 (continued again)
2004-04-25  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/15002 (continued again)
	* include/bits/istream.tcc (getline(basic_istream<>&,
	basic_string<>&, _CharT)): Use a temporary buffer, thus
	avoiding reallocation for common case.

	* include/bits/basic_string.tcc (_S_construct(_InIterator,
	_InIterator, const _Alloc&, input_iterator_tag)): Tweak size
	of temporary buffer to a power of two.

	* testsuite/27_io/basic_istream/getline/char/4.cc: Add comment.

From-SVN: r81163
2004-04-25 15:45:13 +00:00
Paolo Carlini c26fa757dc 10.cc: New.
2004-04-25  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
	New.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
	Likewise.
	* testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.

From-SVN: r81159
2004-04-25 12:56:41 +00:00
Paolo Carlini 062bf89593 PR libstdc++/15002 (continued)
2004-04-24  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/15002 (continued)
	* include/bits/istream.tcc (basic_istream<>::getline(char_type*,
	streamsize, char_type)): Use traits::find/copy in a loop to speed
	up greatly the function in the common case (I/O buffer size >> 1).

2004-04-24  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/getline/char/4.cc: New.

	* include/bits/istream.tcc (getline(basic_istream<>&,
	basic_string<>&, _CharT)): Change to use sgetc()/snextc() instead
	of sbumpc(), consistently with the other functions, thus also
	dealing correctly with the case of exceeded string::max_size().

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r81146
2004-04-24 22:20:31 +00:00
Matthias Klose adabbcf475 Jonathan Wakely <cow@compsoc.man.ac.uk>
2004-04-24  Matthias Klose  <doko@debian.org>

        Jonathan Wakely  <cow@compsoc.man.ac.uk>
        * docs/html/configopts.html: Fix reference to allocator config option.

From-SVN: r81114
2004-04-23 22:06:51 +00:00
Andrew Pinski fc2ae4313b linkage.m4 (GLIBCXX_CHECK_MATH_SUPPORT): Check for libmx also.
2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>

        * linkage.m4 (GLIBCXX_CHECK_MATH_SUPPORT): Check for libmx also.
        * configure: Regenerate.

From-SVN: r81103
2004-04-23 13:06:56 -07:00
Daniel Jacobowitz d8fe7b2985 PR libstdc++/15047, libstdc++/11610
PR libstdc++/15047, libstdc++/11610
	* testsuite/lib/libstdc++.exp (v3-copy-files): Use remote_download.
	(libstdc++_init): Don't pass outdir to v3-copy-files.

From-SVN: r81094
2004-04-23 14:33:36 +00:00
Paolo Carlini 0d8c9baf81 deque.tcc: Trivial formatting fixes.
2004-04-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/deque.tcc: Trivial formatting fixes.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_tree.h: Likewise.

From-SVN: r80960
2004-04-21 14:06:00 +00:00
Paolo Carlini 0a7460199f basic_string.tcc (_M_mutate): Don't compute __src unnecessarily.
2004-04-21  Paolo Carlini  <pcarlini@suse.de>
	    Andrew Pinski  <pinskia@physics.uc.edu>

	* include/bits/basic_string.tcc (_M_mutate): Don't compute
	__src unnecessarily.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>

From-SVN: r80952
2004-04-21 09:23:36 +00:00
Benjamin Kosnik 3dd50c745b 9555-ic.cc: Clarify assertion, set test variable to false before assert.
2004-04-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
	Clarify assertion, set test variable to false before assert.
	* testsuite/27_io/basic_istringstream/str/char/1.cc: Same.
	* testsuite/27_io/basic_stringstream/str/char/1.cc: Same.
	* testsuite/27_io/ios_base/storage/2.cc: Same.

	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix
	function returns.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same.
	* testsuite/27_io/fpos/14320-3.cc: Same.

	* testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std.
	* testsuite/27_io/fpos/1.cc: Same.
	* testsuite/27_io/basic_stringstream/2.cc: Same.
	* testsuite/27_io/basic_stringbuf/4.cc: Same.
	* testsuite/27_io/basic_stringbuf/1.cc: Same.
	* testsuite/27_io/basic_stringbuf/2.cc: Same.
	* testsuite/27_io/basic_streambuf/2.cc: Same.
	* testsuite/27_io/basic_ostringstream/2.cc: Same.
	* testsuite/27_io/basic_ostream/2.cc: Same.
	* testsuite/27_io/basic_ofstream/2.cc: Same.
	* testsuite/27_io/basic_istringstream/2.cc: Same.
	* testsuite/27_io/basic_istream/2.cc: Same.
	* testsuite/27_io/basic_iostream/2.cc: Same.
	* testsuite/27_io/basic_ios/2.cc: Same.
	* testsuite/27_io/basic_ifstream/2.cc: Same.
	* testsuite/27_io/basic_fstream/2.cc: Same.
	* testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx.

	* testsuite/21_strings/basic_string/capacity/1.cc: Don't compare
	unsigned against zero.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Same.

	* testsuite/18_support/new_delete_placement.cc: Initialize
	variables before first use.
	* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/char/1.cc: Same.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Same.
	* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same.
	* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
	Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same.
	* testsuite/27_io/types/2.cc: Same.

	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary
	file name.
	* testsuite/27_io/fpos/14775.cc: Same.

From-SVN: r80861
2004-04-19 19:00:09 +00:00
Paolo Carlini 41b8e86c9a PR libstdc++/15002 (partial)
2004-04-19  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/15002 (partial)
	* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
	Special case __n2 == 1, not calling traits_type::assign/copy.

From-SVN: r80847
2004-04-19 11:30:20 +00:00
Benjamin Kosnik f178c2d695 stl_bvector.h: Use _M_impl._M_start.
2004-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_bvector.h: Use _M_impl._M_start.

From-SVN: r80811
2004-04-18 05:04:58 +00:00
Benjamin Kosnik 390e4c0dbe c++config (_GLIBCXX_STD): New.
2004-04-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config (_GLIBCXX_STD): New.
	* src/list.cc: Use it.
	* include/std/std_bitset.h: Same.
	* include/bits/vector.tcc: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/deque.tcc: Same.
	* include/bits/list.tcc: Same.
	* include/debug/vector: Same.
	* include/debug/set.h: Same.
	* include/debug/multiset.h: Same.
	* include/debug/multimap.h: Same.
	* include/debug/map.h: Same.
	* include/debug/list: Same.
	* include/debug/deque: Same.
	* include/debug/bitset: Same.
	* include/debug/formatter.h (__gnu_debug): Remove using directive.
	Add using declaration for std::type_info.
	* include/debug/safe_iterator.h: Add using declaration for
	std::iterator_traits and std::pair.
	* src/debug_list.cc: New.
	* src/Makefile.am: Add debug_list.cc.
	* src/Makefile.in: Regenerate.
	* config/linker-map.gnu: Add _List_node_base exports for std and
	__gnu_norm.

	* include/bits/stl_bvector.h (_Bvector_base): Use _Bvector_impl
	idiom that other containers use.
	* testsuite/23_containers/vector/bool/clear_allocator.cc: New.

From-SVN: r80763
2004-04-16 19:04:07 +00:00
Paolo Carlini 2f228199b9 re PR libstdc++/14975 ([3.4 only] Segfault on low-level write error during imbue)
2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14975
	* include/bits/fstream.tcc (basic_filebuf::imbue): Zero _M_codecvt
	in case of error.
	* testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: New.

From-SVN: r80753
2004-04-16 16:06:21 +00:00
Paolo Carlini af55af57e1 acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not used anymore.
2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	* acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not
	used anymore.
	* config.h.in: Regenerate.

2004-04-16  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Avoid calling
	btowc unnecessarily, just cast to wchar_t (the concerned chars
	all belong to the basic character set).
	* config/locale/generic/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Likewise.
	* config/locale/gnu/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.

From-SVN: r80746
2004-04-16 09:23:05 +00:00
Paolo Carlini d7ed521ba9 locale.cc (locale::operator==): When _M_impl == __rhs._M_impl avoid constructing unnecessarily this->name().
2004-04-15  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
	avoid constructing unnecessarily this->name().

From-SVN: r80714
2004-04-15 08:27:29 +00:00
Zack Weinberg 76e9802c68 Makefile.am: Add definition of AM_CXXFLAGS.
* testsuite/Makefile.am: Add definition of AM_CXXFLAGS.
	Change definition of CXX to use $(shell) instead of backticks.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r80693
2004-04-14 21:10:52 +00:00
Dhruv Matani e0fb1c5c37 list_sort_search.cc: Minor formatting fixes.
2004-04-12  Dhruv Matani  <dhruvbird@gmx.net>

	* testsuite/performance/20_util/allocator/list_sort_search.cc:
	Minor formatting fixes.
	* testsuite/performance/20_util/allocator/map_mt_find.cc:
	Likewise.

From-SVN: r80624
2004-04-12 16:11:21 +00:00
Paolo Carlini 92861ad4a0 2004-04-12 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/numeric_members.cc
	(numpunct<wchar_t>::_M_initialize_numpunct): No need to wrap
	in __uselocale, since btowc is called for chars belonging to
	the basic character set.

From-SVN: r80618
2004-04-12 08:36:23 +00:00
Paolo Carlini 895510be6f 1.cc: Remove junk.
2004-04-09  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/messages/members/char/1.cc: Remove junk.
	* testsuite/22_locale/messages/members/char/2.cc: Ditto.
	* testsuite/22_locale/messages/members/char/3.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/1.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/2.cc: Ditto.
	* testsuite/22_locale/num_get/get/char/3.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/1.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/2.cc: Ditto.
	* testsuite/22_locale/num_put/put/char/3.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/numpunct/members/char/1.cc: Ditto.
	* testsuite/22_locale/numpunct/members/wchar_t/1.cc: Ditto.

From-SVN: r80545
2004-04-09 10:18:33 +00:00
Paolo Carlini ba98a8d81a time_members.cc (__timepunct<char>::_M_initialize_timepunct, [...]): the correct _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
2004-04-07  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/time_members.cc
	(__timepunct<char>::_M_initialize_timepunct,
	__timepunct<wchar_t>::_M_initialize_timepunct): the correct
	_M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
	* config/locale/gnu/time_members.cc
	(__timepunct<char>::_M_initialize_timepunct,
	__timepunct<wchar_t>::_M_initialize_timepunct): Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/4.cc: New.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New.

	* testsuite/22_locale/time_get/date_order/char/1.cc: Remove junk.
	* testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/char/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/2.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/3.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/4.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/5.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/6.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/7.cc: Ditto.
	* testsuite/22_locale/time_put/put/char/8.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Ditto.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Ditto.

	* testsuite/22_locale/time_put/put/char/9780-1.cc: Fix typos.

From-SVN: r80493
2004-04-07 23:14:08 +00:00
Paolo Carlini f332a090b2 2004-04-07 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t>::_M_initialize_moneypunct): Prefer
	_NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC,
	and __MON_GROUPING to _NL_NUMERIC_DECIMAL_POINT_WC,
	_NL_NUMERIC_THOUSANDS_SEP_WC, and GROUPING.
	* config/locale/gnu/numeric_members.cc
	(numpunct<char>::_M_initialize_numpunct): Prefer DECIMAL_POINT
	and THOUSANDS_SEP to the deprecated RADIXCHAR and THOUSEP.

From-SVN: r80477
2004-04-07 14:32:47 +00:00
Benjamin Kosnik 563ae04fec Fixups for EDG front end.
2004-04-06  Benjamin Kosnik  <bkoz@redhat.com>

	Fixups for EDG front end.
	* include/ext/rope: Instead of non-existent function
	_Data_allocate, use allocator's allocate. Use this.
	(namespace _Rope_constants): Move _S_max_rope_depth, and _Tag
	enumerations from _Rope_RopeRep here.
	* include/ext/ropeimpl.h: Same.
	* src/ext-inst.cc (_S_min_len): Fix up definition.

	* config/locale/gnu/ctype_members.cc: Qualify base class members
	with this.
	* config/locale/generic/ctype_members.cc: Same.
	* config/locale/gnu/messages_members.h: Same.
	* config/locale/generic/messages_members.h: Same.
	* src/ctype.cc: Same.
	* include/bits/codecvt.h: Same.

	* include/bits/boost_concept_check.h: Declare.
	(__error_type_must_be_an_unsigned_integer_type): Remove this.
	(__error_type_must_be_an_integer_type): Remove this.
	(__error_type_must_be_a_signed_integer_type): Remove this.

	* config/io/basic_file_stdio.cc (__basic_file::sys_open): Remove cast.

	* libsupc++/eh_alloc.cc (__cxa_free_exception): Add exception
	specification to definition.
	(__cxa_allocate_exception): Same.
	* libsupc++/eh_catch.cc (__cxa_begin_catch): Same.
	* libsupc++/eh_globals.cc (__cxa_get_globals_fast): Same.
	(__cxa_get_globals): Same.

	* libsupc++/del_op.cc: Add comment about freestanding.

From-SVN: r80475
2004-04-07 03:33:36 +00:00
Paolo Carlini 268d3b1832 mt_allocator.h (__mt_alloc<>::deallocate): The critical section is actually very small, only two assignments.
2004-04-05  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	The critical section is actually very small, only two assignments.

From-SVN: r80439
2004-04-05 22:46:04 +00:00
Paolo Carlini 9f35e4aab5 filebuf_sputn_unbuf.cc: New, adapted from libstdc++/11378.
2004-04-04  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	* testsuite/performance/27_io/filebuf_sputn_unbuf.cc: New,
	adapted from libstdc++/11378.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r80398
2004-04-04 18:18:29 +00:00
Paolo Carlini c8333c0fd5 mt_allocator.h (__mt_alloc<>::allocate): Factor out some duplicated code.
2004-04-03  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate): Factor out
	some duplicated code.
	(__mt_alloc<>::_Bin_record): Spare the space of _M_free and _M_used
	in the single threaded case.
	* testsuite/performance/20_util/allocator/list_sort_search.cc:
	Reorder and renumber the tests consistently with the other testfiles.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_thread.cc: Ditto.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto.

From-SVN: r80375
2004-04-03 13:39:16 +00:00
Paolo Carlini ab40b100d3 mt_allocator.h (__mt_alloc<>::deallocate): Rearrange arithmetic to avoid computing two divisions at each deallocation.
2004-04-02  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	Rearrange arithmetic to avoid computing two divisions at
	each deallocation.

From-SVN: r80356
2004-04-02 19:51:21 +00:00
Paolo Carlini 354d4c68c6 mt_allocator.h (__mt_alloc<>::_S_initialize): Streamline the second half...
2004-04-01  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::_S_initialize):
	Streamline the second half, wrapping it in a single
	'#ifdef __GTHREADS if (__gthread_active_p())' and avoiding
	conditionals inside loops.

From-SVN: r80323
2004-04-01 21:47:59 +00:00
Paolo Carlini 2ae6e9823a re PR libstdc++/14775 ([3.4 only] LFS tests missing)
2004-04-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14775
	* acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS.
	* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call
	GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define
	to _GLIBCXX_RES_LIMITS.
	(GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to
	HAVE_LIMIT_*.
	* testsuite/testsuite_hooks.h: Declare set_file_limit.
	* testsuite/testsuite_hooks.cc: Define it, using getrlimit
	and setrlimit(RLIMIT_FSIZE).
	* testsuite/27_io/fpos/14775.cc: New.
	* config.h.in: Regenerate.
	* configure: Likewise.

From-SVN: r80289
2004-04-01 09:16:36 +00:00
Paolo Carlini e004c3313e c_locale.cc (__convert_to_v(long double&)): In v3 uses of sscanf...
2004-03-31  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc (__convert_to_v(long double&)):
	In v3 uses of sscanf, the special floating-point numbers INF,
	INFINITY, etc., cannot occur in input, therefore, if the latter
	is too large, ERANGE is always stored in errno, no need of finitel.

From-SVN: r80247
2004-03-31 09:13:10 +00:00
Benjamin Kosnik 06ce772609 re PR libstdc++/14783 (Warning in std::set constructor at bits/stl_tree.h:403)
2004-03-30  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/14783
	* include/bits/stl_tree.h: Adjust initialization list order.

From-SVN: r80095
2004-03-30 21:04:19 +00:00
Loren J. Rittle 7be1c3fba9 Update comment to reflect test.
From-SVN: r80067
2004-03-29 23:42:05 +00:00
Paolo Carlini 63041e68a4 pthread7-rope.cc: Fix...
2004-03-29  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/thread/pthread7-rope.cc: Fix, unpredictably, depending
	on allocator behavior, the memory pointed by data2 may well be not
	trashed.

From-SVN: r80051
2004-03-29 09:54:15 +00:00
Chavdar Botev f26e5597f0 re PR libstdc++/14245 ([3.4 only] problem with user-defined allocators in std::basic_string)
2004-03-28  Chavdar Botev  <cbotev@yahoo.com>

	PR libstdc++/14245
	* include/bits/basic_string.tcc
	(basic_string::basic_string(const basic_string&)): Pass to
	_Rep::_M_grab the actual allocator of the string being constructed
	not the default constructed one.

From-SVN: r80041
2004-03-28 16:27:27 +00:00
Benjamin Kosnik a5f105b590 [multiple changes]
2004-03-27  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++ PR/13598
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h
	(__enc_traits::_M_destroy): New.
	(__enc_traits::~__enc_traits): Use it.
	(__enc_traits::operator=): Use _M_destroy, _M_init.
	(__enc_traits::__enc_traits): Same.

2004-03-27  Petur Runolfsson  <peturr02@ru.is>

	* testsuite/ext/enc_filebuf/char/13598.cc: New.

From-SVN: r80027
2004-03-27 16:21:21 +00:00
Paolo Carlini 6f52a889fd [multiple changes]
2004-03-27  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h: Uglify consistently names of
	variables, members and classes; tidy.

2004-03-27  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/mt_allocator.h (__mt_alloc<>::deallocate):
	Deallocation loop rewrote.

From-SVN: r80012
2004-03-27 10:15:49 +00:00
Paolo Carlini dd95381f8a mt_allocator.h (__mt_alloc<>::allocate, [...]): Protect two instances of block->thread_id with __GTHREADS.
2004-03-26  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate,
	__mt_alloc<>::deallocate): Protect two instances of
	block->thread_id with __GTHREADS.

From-SVN: r79986
2004-03-26 16:56:09 +00:00
Benjamin Kosnik 8bd22a3ceb [multiple changes]
2004-03-25  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_tree.h (_Rb_tree_impl): Add _Node_allocator
	default argument in constructors.
	(_Rb_tree::_M_empty_initialize): Remove.

2004-03-25  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/map/operators/1_neg.cc: Adjust line numbers.
	* testsuite/23_containers/set/operators/1_neg.cc: Same.

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/cpp_type_traits.h: Changed __is_pod
	completely. Now, it does not use any of the previous type_traits
	to detect the pod types, and it also detects function pointers as
	POD types.

	* include/bits/stl_tree.h: Introduced a new class _Rb_tree_impl,
	which encapsulates the internal implementation of an rb_tree. Made
	the allocator a base class of this class instead of the rb_tree,
	which was not conforming. This _Rb_tree_impl class is also
	specialized on whether the _Compare parameter is a POD type or
	not. If so, then it maintains the comparison function as a data
	member, otherwise it makes the _Compare parameter a base class of
	itself. Also, _M_key_compare is now a function instead of a data
	member, so that the above trick can work properly. Delegated the
	initialization of the other data members to this newly created
	class. Also, now other member functions of rb_tree must refer to
	_M_key_compare as _M_impl._M_key_compare(). The other data members
	(*) can be referenced to as _M_impl.(*), where
	(*) includes _M_header, and _M_node_count.

From-SVN: r79977
2004-03-26 00:38:57 +00:00
Paolo Carlini 90ceccd46e mt_allocator.h (__mt_alloc<>::tune): Add _M_min_bin, the size in bytes of the smallest bin.
2004-03-25  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::tune):
	Add _M_min_bin, the size in bytes of the smallest bin.
	(__mt_alloc<>::tune()): Tweak accordingly.
	(__mt_alloc<>::tune(size_t, ...)): Likewise.
	(__mt_alloc<>::block_record): Change to a union: members next
	and thread_id are never used at the same time.
	(__mt_alloc<>::allocate): Update consistently.
	(__mt_alloc<>::deallocate): Likewise.
	(__mt_alloc<>::_S_initialize): Update setups of _S_binmap and
	_S_bin_size for the configurable _M_min_size.

From-SVN: r79962
2004-03-25 18:23:40 +00:00
Dhruv Matani 03f9ea4437 stl_list.h: Created a _List_impl class and made it derive from the allocator...
2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_list.h: Created a _List_impl class and made it
	derive from the allocator, instead of the list deriving from the
	allocator class, which was not conformant. Changed all references
	from this->_M_node to this->_M_impl._M_node * bits/list.tcc: Same
	as above (changed all references to the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_deque.h: Created a _Deque_impl class and made
	it derive from the allocator, instead of the deque deriving from
	the allocator class, which was not conformant. Changed all
	references to the _M_start, _M_finish, _M_map, and _M_map_size to
	_M_impl.*.
	(_Deque_base<_Tp,_Alloc>::~_Deque_base()): Added this->
	qualification in 2 places where it was missing.
	(_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t)): Same as
	above.
	* include/bits/deque.tcc: Same as above (changed all references to
	the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* include/bits/stl_vector.h: Created a _Vector_impl class and made
	it derive from the allocator, instead of the _Vector_base class,
	deriving from the allocator which was not conformant. Changed all
	references to the _M_start, _M_finish, and _M_end_of_storage to
	_M_impl.*.
	* include/bits/vector.tcc: Same as above (changed all references
	to the concerned variables).

2004-03-25  Dhruv Matani  <dhruvbird@gmx.net>

	* testsuite/23_containers/deque/cons/clear_allocator.cc: New.
	* testsuite/23_containers/list/cons/clear_allocator.cc: New.
	* testsuite/23_containers/vector/cons/clear_allocator.cc: New.

From-SVN: r79957
2004-03-25 17:12:16 +00:00
Dhruv Matani 58c959212f malloc_allocator.h: Fixed the construct function to call global placement new instead of assignment.
2004-03-24  Dhruv Matani  <dhruvbird@gmx.net>

	* ext/malloc_allocator.h: Fixed the construct function to call
	global placement new instead of assignment. Added a check after
	the return from malloc to check whether returned pointer is NULL,
	and if so, throw std::bad_alloc().
	* ext/debug_allocator.h: Added a check in the deallocate function
	to check whether the user has passed a NULL pointer or not.

From-SVN: r79934
2004-03-24 21:40:01 +00:00
Benjamin Kosnik 8367b9c1e9 allocator.html: Add bitmap_allocator links.
2004-03-24  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/20_util/allocator.html: Add bitmap_allocator links.

From-SVN: r79933
2004-03-24 21:30:26 +00:00
Andreas Schwab d62c1a1f98 prune.exp (prune_gcc_output): Ignore errata warning from IA64 assembler.
gcc/testsuite/:
	* lib/prune.exp (prune_gcc_output): Ignore errata warning from
	IA64 assembler.

libstdc++-v3/:
	* testsuite/lib/prune.exp (prune_g++_output): Ignore errata
	warning from IA64 assembler.

From-SVN: r79929
2004-03-24 19:54:26 +00:00
Dhruv Matani 71f9a9d15e bitmap_allocator.h: (_Bit_scan_forward) -> Made this function call __builtin_ctz instead of the...
2004-03-24  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/bitmap_allocator.h: (_Bit_scan_forward) -> Made this
	function call __builtin_ctz instead of the while loop.
	(allocate) -> If condition has __builtin_expect.
	(deallocate) -> Ditto.
	Renamed a few left-over variables and typedefs according to the
	C++STYLE mentioned in the documentation.
	Protected calls to __gthread* by __gthread_active_p(), whose value
	is cached in the local variable __threads_active.

From-SVN: r79924
2004-03-24 18:27:43 +00:00
Felix Yen b4a76c01db producer_consumer.cc: Use linear algorithm for producer.
2004-03-24  Felix Yen  <fwy@alumni.brown.edu>

	* testsuite/performance/20_util/allocator/producer_consumer.cc:
	Use linear algorithm for producer.

From-SVN: r79920
2004-03-24 17:16:07 +00:00
Paolo Carlini affb18b2fa mt_allocator.h (__mt_alloc<>::allocate, [...]): Avoid redundant conditionals.
2004-03-24  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h (__mt_alloc<>::allocate,
	__mt_alloc<>::deallocate): Avoid redundant conditionals.

From-SVN: r79917
2004-03-24 15:25:37 +00:00
Benjamin Kosnik 586b5f2013 locale_facets.h: Tweaks for 80 column.
2004-03-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h: Tweaks for 80 column.
	(__numpunct_cache::_M_cache): Move to locale_facets.tcc.
	(__moneypunct_cache::_M_cache): Same.
	(num_get): Don't inherit from __num_base.
	(num_put): Same.
	(money_get): Don't inherit from money_base.
	(money_put): Same.
	(__timepunct::_M_am_pm_format): New.
	(time_get::_M_extract_num): Return iterator, use ios_base as argument.
	(time_get::_M_extract_name): Same.
	(time_get::_M_extract_via_format): Same.
	* include/bits/locale_facets.tcc: Tweaks for 80 column.
	Use _M_getloc instead of getloc.
	* testsuite/22_locale/money_put/put/char/9780-3.cc: New.
	* testsuite/22_locale/num_put/put/char/9780-2.cc: New.
	* testsuite/22_locale/time_put/put/char/9780-1.cc: New.

From-SVN: r79902
2004-03-24 06:41:07 +00:00
Paolo Carlini 29d4adf460 acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator.
2004-03-22  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator.
	* configure: Regenerate.
	* config/allocator/pool_allocator_base.h: New.
	* include/ext/pool_allocator.h: Convert to a standard-conforming
	allocator.
	* src/allocator.cc: Tweak instantiations.
	* testsuite/performance/20_util/allocator/insert.cc: Add __pool_alloc.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Ditto.
	* testsuite/performance/20_util/allocator/list_sort_search.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto.
	* testsuite/performance/20_util/allocator/map_thread.cc: Ditto.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto.

From-SVN: r79824
2004-03-22 13:07:13 +00:00
Hans-Peter Nilsson fea41ef911 atomicity.h (__atomic_add): Remove "static inline" and attribute-unused.
* config/cpu/cris/atomicity.h (__atomic_add): Remove "static
	inline" and attribute-unused.  Qualify parameter __mem with
	"volatile".
	(__exchange_and_add): Ditto.  Add back memory clobber to asm.

From-SVN: r79804
2004-03-22 01:37:04 +00:00
Paolo Carlini 9c024d9c08 2.cc: Remove junk.
2004-03-20  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_arithmetic/char/2.cc:
	Remove junk.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/6.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/7.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/8.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/9.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
	Likewise.

From-SVN: r79742
2004-03-20 12:54:35 +00:00
Paolo Carlini 2787b59a7f std_valarray.h: Document DR389 [Ready].
2004-03-20  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_valarray.h: Document DR389 [Ready].
	* docs/html/ext/howto.html: Add an entry for DR389.

From-SVN: r79733
2004-03-20 10:05:48 +00:00
Michael Eager 1b1a632b4d atomicity.h: Prevent reg loads between LL and SC instructions.
2004-03-19  Michael Eager  <eager@mvista.com>

	* config/cpu/mips/atomicity.h:  Prevent reg loads between LL and
	SC instructions.

From-SVN: r79711
2004-03-19 23:12:10 +00:00
Paolo Carlini 28f2a26519 11.cc: Remove redundant static_cast-s.
2004-03-19  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_get/get/char/11.cc: Remove redundant
	static_cast-s.
	* testsuite/22_locale/num_get/get/char/12.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/13.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/14.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/15.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/13.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/14.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/15.cc: Likewise.

From-SVN: r79698
2004-03-19 20:07:55 +00:00
Paolo Carlini 8268bba6f8 re PR libstdc++/12077 ([3.4 only] wcin.rdbuf()->in_avail() return value too high)
2004-03-19  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/12077
	* include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's
	no way to find out the conversion used by the underlying FILE*.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New.
	* testsuite/27_io/objects/char/9.cc: Tweak.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r79695
2004-03-19 19:31:38 +00:00
Paolo Carlini 59d3567214 re PR libstdc++/14648 (rope is broken (regression))
2004-03-19  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14648
	* include/ext/ropeimpl.h (rope<>::_S_apply_to_pieces): Fix
	memory allocation/deallocation calls.
	* testsuite/ext/14648.cc: New.

From-SVN: r79687
2004-03-19 16:08:15 +00:00
Peter Schmid ab7ac2227a re PR libstdc++/14647 (bit_vectors are broken (regression))
2004-03-19  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        PR libstdc++/14647
        * include/backward/bvector.h (bit_vector): Allocator is in std
        namespace.

From-SVN: r79685
2004-03-19 06:54:40 -08:00
Phil Edwards d54bc1d870 acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT): Set LIBICONV, not libiconv.
2004-03-19  Phil Edwards  <phil@codesourcery.com>

	* acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT):  Set LIBICONV,
	not libiconv.  SUBST this variable as well.
	* testsuite/Makefile.am (site.exp):  New target, based on that
	created by automake.  Also set libiconv.

	* configure, Makefile.in, include/Makefile.in, libmath/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in:  Regenerate.

From-SVN: r79678
2004-03-19 11:34:47 +00:00
Benjamin Kosnik 87599abdc5 acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Default setting is new_allocator for all hosts.
2004-03-16  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Default setting is
	new_allocator for all hosts.
	* configure: Regenerate.

From-SVN: r79582
2004-03-17 08:50:32 +00:00
Paolo Carlini e20036e26c 4.cc: Fix for 64-bit pointers.
2004-03-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_put/put/char/4.cc: Fix for 64-bit pointers.
	* testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise.

From-SVN: r79580
2004-03-17 08:22:38 +00:00
Paolo Carlini 33674f003a locale_facets.tcc (money_get<>::_M_extract): Adjust the logic underlying the parsing of symbol to deal correctly with an...
2004-03-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Adjust the logic underlying the parsing of symbol to deal
	correctly with an optional sign component (i.e., when either
	negative_sign or positive_sign is empty)
	* testsuite/22_locale/money_get/get/char/19.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/19.cc: New.

2004-03-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Do not accept an incomplete currency symbol.
	* testsuite/22_locale/money_get/get/char/18.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/18.cc: New.

From-SVN: r79491
2004-03-15 09:02:30 +00:00
Benjamin Kosnik 8b0d605196 allocator: New.
2004-03-13  Benjamin Kosnik  <bkoz@redhat.com>

	* config/allocator: New.
	* config/allocator/bitmap_allocator_base.h: New.
	* config/allocator/malloc_allocator_base.h: New.
	* config/allocator/mt_allocator_base.h: New.
	* config/allocator/new_allocator_base.h: New.
	* include/bits/allocator.h: Include c++allocator.h.
	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): New.
	* aclocal.m4: Regenerate.
	* configure.ac: Use GLIBCXX_ENABLE_ALLOCATOR.
	* configure: Regenerate.
	* include/Makefile.am (host_headers_extra): Add c++allocator.h.
	* include/Makefile.in: Regenerate.
	* docs/html/configopts.html: Add enable-libstdcxx-allocator.

From-SVN: r79435
2004-03-13 06:54:25 +00:00
Benjamin Kosnik eef56029ed allocator.h: Revert.
2004-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h: Revert.

From-SVN: r79413
2004-03-12 23:52:08 +00:00
Paolo Carlini d4cd08dda5 howto.html: Add entry for DR 253 [Ready].
2004-03-12  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/howto.html: Add entry for DR 253 [Ready].
	* include/bits/gslice_array.h: Add comment about DR 253.
	* include/bits/indirect_array.h: Likewise.
	* include/bits/mask_array.h: Likewise.
	* include/bits/slice_array.h: Likewise.

From-SVN: r79412
2004-03-12 23:32:03 +00:00
Benjamin Kosnik ce7df2fd97 14176.cc: New.
2004-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/20_util/allocator/14176.cc: New.
	* include/ext/mt_allocator.h: Formatting fixes.

From-SVN: r79407
2004-03-12 21:11:51 +00:00
Paolo Carlini e362800142 2004-03-12 Paolo Carlini <pcarlini@suse.de>
* Fix address in Steven's Changelog entry.

From-SVN: r79381
2004-03-12 12:19:28 +00:00
Dhruv Matani 009368dba6 ballocator_doc.txt: New file.
2004-03-11  Dhruv Matani  <dhruvbird@HotPOP.com>

	* docs/html/ext/ballocator_doc.txt: New file.
	* include/Makefile.am (ext_headers): Add
	${ext_srcdir}/bitmap_allocator.h .
	* include/Makefile.in: Regenerate (by hand, since I didn't have
	automake de jure on hand).
	* include/ext/bitmap_allocator.h: New file.
	* testsuite/performance/20_util/allocator/list_sort_search.cc: New test.
	* testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.
	* testsuite/performance/20_util/allocator/producer_consumer.cc: Add
	test for the bitmap_allocator<>.
	* testsuite/performance/20_util/allocator/insert.cc: Likewise.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
	* testsuite/performance/20_util/allocator/map_thread.cc: Likewise.

From-SVN: r79366
2004-03-12 03:28:12 +00:00
Paolo Carlini c6feb69790 std_complex.h (pow(const complex&, const _Tp&), [...]): Fully qualify with std:: a few calls.
2004-03-11  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_complex.h (pow(const complex&, const _Tp&),
	pow(const _Tp&, const complex&), pow(const complex&,
	const complex&)): Fully qualify with std:: a few calls.
	* testsuite/26_numerics/complex/13450.cc: Minor tweak.

From-SVN: r79338
2004-03-11 19:05:19 +00:00
Steven Bosscher b7c34954fe re PR libstdc++/11706 (std::pow(T, int) implementation pessimizes code)
2004-03-11  Steven Bosscher  <s.bosscher@student.tudelft.nl>

	PR libstdc++/11706
	* include/c_std/cmath.tcc (__cmath_power): Define inline.

From-SVN: r79316
2004-03-11 10:42:26 +00:00
Kelley Cook 8ab705be38 configure.ac: Bump AC_PREREQ to 2.59.
boehm-gc/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config.in: Regenerate.

fastjar/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

intl/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config.h.in: Regenerate.

gcc/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

libada/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.in: Rename file to ...
	* configure.ac: .. to this. Bump AC_PREREQ to 2.59.
	* configure: Regenerate.

libjava/libltdl/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.
	* configure: Regenerate.
	* config-h.in: Regenerate.

libstdc++-v3/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* configure.ac: Bump AC_PREREQ to 2.59.

contrib/
2004-03-10  Kelley Cook  <kcook@gcc.gnu.org>

	* gcc_update (files_and_dependencies): Insert libada/configure.

From-SVN: r79285
2004-03-11 00:27:41 +00:00
Paolo Carlini f69535d2b7 valarray_subset_assignment.cc: Fix typos.
2004-03-10  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/26_numerics/valarray_subset_assignment.cc: Fix typos.

From-SVN: r79253
2004-03-10 13:40:17 +00:00
Paul Kienzle 52ddaf41bf re PR libstdc++/13450 (std::pow(std::complex<double>(-1.,0.),0.5) yields (NaN,0))
2004-03-10  Paul Kienzle  <pkienzle@nist.gov>
	    Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13450
	* include/std/std_complex.h (pow(const complex&, const _Tp&),
	pow(const _Tp&, const complex&)): Use cmath pow only when safe.
	* testsuite/26_numerics/complex/13450.cc: New.

	* testsuite/26_numerics/cmath/overloads.C: Rename to overloads.cc.
	* testsuite/26_numerics/complex/pow.C: Rename to pow.cc and fix.

From-SVN: r79227
2004-03-10 09:16:12 +00:00
Jerry Quinn ecc7568da6 re PR libstdc++/3247 (valarray private member)
2004-03-10  Jerry Quinn  <jlquinn@optonline.net>

	PR 3247
	* include/bits/gslice_array.h (gslice_array()): Make public.
	(operator=(gslice_array)): Make public.  Implement.
	* include/bits/indirect_array.h (indirect_array()): Make public.
	* include/bits/mask_array.h (mask_array()): Make public.
	(operator=(mask_array)): Make public.  Implement.
	* include/bits/valarray_array.tcc (__valarray_copy):
	Comment.  Add versions for gslice_array and mask_array.
	* testsuite/26_numerics/valarray_subset_assignment.cc:  New test.

From-SVN: r79226
2004-03-10 06:50:13 +00:00
Benjamin Kosnik 6dde938c11 swap.cc: Add in bits for non-weak systems.
2004-03-09  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/deque/modifiers/swap.cc: Add in bits for
	non-weak systems.
	* testsuite/23_containers/vector/modifiers/swap.cc: Same.
	* testsuite/23_containers/set/modifiers/swap.cc: Same.
	* testsuite/23_containers/multiset/modifiers/swap.cc: Same.
	* testsuite/23_containers/multimap/modifiers/swap.cc: Same.
	* testsuite/23_containers/map/modifiers/swap.cc: Same.
	* testsuite/23_containers/list/modifiers/swap.cc: Same.

	* testsuite/22_locale/locale/cons/12658_thread.cc: Catch exceptions.

From-SVN: r79224
2004-03-10 06:31:50 +00:00
Benjamin Kosnik f1c4ca32d0 re PR c++/13658 ([testcase] namespace association vs. templates part one)
2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	PR c++/13658
	* testsuite/23_containers/deque/modifiers/swap.cc: New.
	* testsuite/23_containers/list/modifiers/swap.cc: New.
	* testsuite/23_containers/map/modifiers/swap.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap.cc: New.
	* testsuite/23_containers/set/modifiers/swap.cc: New.
	* testsuite/23_containers/vector/modifiers/swap.cc: New.

From-SVN: r79151
2004-03-09 06:01:39 +00:00
Petur Runolfsson 5a66cfb2f1 re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2004-03-08  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/12658
	* testsuite/22_locale/locale/cons/12658_thread.cc: New.

From-SVN: r79128
2004-03-08 22:11:47 +00:00
Paolo Carlini 1d4eb925b9 howto.html: Add entry for DR 103 [WP].
2004-03-08  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/howto.html: Add entry for DR 103 [WP].
	* include/bits/stl_multiset.h: Add comment about DR 103.
	* include/bits/stl_set.h: Likewise.

From-SVN: r79114
2004-03-08 15:04:11 +00:00
Paolo Carlini f1c89270e5 locale_facets.tcc (money_get<>::_M_extract): The value _space_ indicates that at least one space is required at that position.
2004-03-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	The value _space_ indicates that at least one space is required
	at that position.
	* testsuite/22_locale/money_get/get/char/17.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/17.cc: New.

	* testsuite/22_locale/money_get/get/char/7.cc: Minor tweaks.
	* testsuite/22_locale/money_get/get/wchar_t/7.cc: Likewise.

	* include/bits/locale_facets.tcc (money_get<>::do_get(long_double&)):
	Remove redundant conditional on __str.size().

From-SVN: r79111
2004-03-08 10:51:30 +00:00
Benjamin Kosnik f5fb3886b2 allocator.h: Switch defaults to mt_alloc.
2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h: Switch defaults to mt_alloc.

From-SVN: r79084
2004-03-08 00:27:37 +00:00
Benjamin Kosnik c0bec71b82 mt_allocator.h (_S_initialize): If !__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.
2004-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/mt_allocator.h (_S_initialize): If
	!__GTHREAD_MUTEX_INIT, then initialize _S_thread_freelist_mutex.

From-SVN: r79044
2004-03-07 02:17:19 +00:00
Benjamin Kosnik f83295bafc re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2004-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12658
	* src/locale_init.cc (locale::locale): Lock critical regions with
	external mutexes.
	(locale::global): Same.
	* include/bits/concurrence.h (__glibcxx_mutex_define_initialized):
	Add in once bits for cases without __GTHREAD_MUTEX_INIT.
	(__glibcxx_mutex_lock): Same.

	* config/cpu/generic/atomicity.h: Remove
	_GLIBCXX_NEED_GENERIC_MUTEX, use concurrence.h.
	* src/misc-inst.cc: Move all locking bits out of this file.

	* config/os/hpux/os_defines.h: Remove _GLIBCXX_INST_ATOMICITY_LOCK.
	* src/misc-inst.cc: Same.
	* config/cpu/hppa/atomicity.h: Same.

	* config/linker-map.gnu: Remove types in the signature of atomic
	exports, as they may vary.

From-SVN: r79043
2004-03-07 01:32:43 +00:00
Paolo Carlini 0c2cc7b37a locale_facets.tcc: Tweak the comment preceding has_facet: doesn't throw.
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc: Tweak the comment preceding
	has_facet: doesn't throw.

From-SVN: r79022
2004-03-06 16:55:28 +00:00
Paolo Carlini 73da19bbb6 1.cc: Clean up.
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_get/get/char/1.cc: Clean up.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.

From-SVN: r79019
2004-03-06 14:56:56 +00:00
Paolo Carlini ce3455909f locale_facets.tcc (num_get<>::_M_extract_float, [...]): Prefer plain operator== to traits::eq().
2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, num_get<>::do_get(bool&),
	__pad<>::_S_pad): Prefer plain operator== to traits::eq().
	* testsuite/testsuite_character.h (struct __gnu_test::character):
	Provide operator==.
	* testsuite/testsuite_hooks.h (struct __gnu_test::pod_char):
	Likewise.

From-SVN: r79011
2004-03-06 09:00:14 +00:00
Paolo Carlini 35bd3c283e 14320-2.cc: Remove xfail.
2004-03-05  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/fpos/14320-2.cc: Remove xfail.

From-SVN: r78963
2004-03-05 10:51:27 +00:00
Benjamin Kosnik 80e39f4ae5 1.cc: Test result string.
2004-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/multiset/insert/1.cc: Test result string.

	* testsuite/23_containers/bitset/invalidation/1.cc: Main always
	returns 0.
	* testsuite/23_containers/deque/invalidation/4.cc: Same.
	* testsuite/23_containers/list/invalidation/1.cc: Same.
	* testsuite/23_containers/list/invalidation/2.cc: Same.
	* testsuite/23_containers/list/invalidation/3.cc: Same.
	* testsuite/23_containers/list/invalidation/4.cc: Same.
	* testsuite/23_containers/map/invalidation/2.cc: Same.
	* testsuite/23_containers/multimap/invalidation/1.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/invalidation/1.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/set/invalidation/1.cc: Same.
	* testsuite/23_containers/set/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/1.cc: Same.
	* testsuite/23_containers/vector/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/3.cc: Same.
	* testsuite/23_containers/vector/invalidation/4.cc: Same.

From-SVN: r78943
2004-03-04 23:37:24 +00:00
Paolo Carlini 2aa89cbb78 testsuite_flags.in: Add "-D_GLIBCXX_ASSERT" to CXXFLAGS_save.
2004-03-04  Paolo Carlini  <pcarlini@suse.de>

	* scripts/testsuite_flags.in: Add "-D_GLIBCXX_ASSERT" to
	CXXFLAGS_save.
	* testsuite/lib/libstdc++.exp: Don't add it conditionally to
	DEFAULT_CXXFLAGS.
	* testsuite/18_support/numeric_limits.cc: Remove "-D_GLIBCXX_ASSERT"
	from the dg-options.
	* testsuite/23_containers/vector/invalidation/1.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/2.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/3.cc: Likewise.
	* testsuite/23_containers/vector/invalidation/4.cc: Likewise.
	* testsuite/23_containers/vector/resize/1.cc: Likewise.
	* testsuite/26_numerics/complex_value.cc: Likewise.
	* testsuite/27_io/ios_base/storage/1.cc: Likewise.
	* testsuite/27_io/ios_base/storage/2.cc: Likewise.
	* testsuite/27_io/ios_base/storage/3.cc: Likewise.
	* testsuite/27_io/manipulators/standard/char/2.cc: Likewise.
	* testsuite/27_io/objects/char/5.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/5.cc: Likewise.
	* testsuite/backward/11460.cc: Likewise.
	* testsuite/thread/pthread7-rope.cc: Likewise.

	* testsuite/21_strings/basic_string/compare/char/1.cc: Add
	missing test variable.
	* testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Add
	missing test variable.

From-SVN: r78942
2004-03-04 23:29:44 +00:00
Benjamin Kosnik f90e600a4e 1.cc: Provide explicit instantiations for non-weak systems.
2004-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/20_util/allocator/1.cc: Provide explicit
	instantiations for non-weak systems.
	* testsuite/20_util/binders.cc: Same.
	* testsuite/20_util/allocator/8230.cc: Same.
	* testsuite/20_util/allocator/10378.cc: Same.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/is/char/2.cc: Same.
	* testsuite/thread/pthread7-rope.cc: Same.
	* testsuite/thread/pthread6.cc: Same.
	* testsuite/thread/pthread5.cc: Same.
	* testsuite/thread/pthread4.cc: Same.
	* testsuite/thread/pthread1.cc: Same.
	* testsuite/ext/rope.cc: Same.
	* testsuite/ext/hash_set.cc: Same.
	* testsuite/ext/hash_map.cc: Same.
	* testsuite/ext/concept_checks.cc: Same.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: Same.
	* testsuite/25_algorithms/unique/2.cc: Same.
	* testsuite/25_algorithms/unique/1.cc: Same.
	* testsuite/25_algorithms/rotate.cc: Same.
	* testsuite/25_algorithms/min_max.cc: Same.
	* testsuite/25_algorithms/equal.cc: Same.
	* testsuite/24_iterators/rel_ops.cc: Same.
	* testsuite/24_iterators/iterator.cc: Same.
	* testsuite/24_iterators/insert_iterator.cc: Same.
	* testsuite/24_iterators/front_insert_iterator.cc: Same.
	* testsuite/24_iterators/back_insert_iterator.cc: Same.
	* testsuite/23_containers/vector/resize/1.cc: Same.
	* testsuite/23_containers/vector/modifiers/2.cc: Same.
	* testsuite/23_containers/vector/modifiers/1.cc: Same.
	* testsuite/23_containers/vector/invalidation/4.cc: Same.
	* testsuite/23_containers/vector/invalidation/3.cc: Same.
	* testsuite/23_containers/vector/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/1.cc: Same.
	* testsuite/23_containers/vector/element_access/1.cc: Same.
	* testsuite/23_containers/vector/cons/6513.cc: Same.
	* testsuite/23_containers/vector/cons/3.cc: Same.
	* testsuite/23_containers/vector/cons/2.cc: Same.
	* testsuite/23_containers/vector/cons/1.cc: Same.
	* testsuite/23_containers/vector/capacity/8230.cc: Same.
	* testsuite/23_containers/vector/capacity/1.cc: Same.
	* testsuite/23_containers/vector/bool/6886.cc: Same.
	* testsuite/23_containers/stack/members/7158.cc: Same.
	* testsuite/23_containers/set/invalidation/2.cc: Same.
	* testsuite/23_containers/set/invalidation/1.cc: Same.
	* testsuite/23_containers/queue/members/7157.cc: Same.
	* testsuite/23_containers/priority_queue/members/7161.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/invalidation/2.cc: Same.
	* testsuite/23_containers/multiset/insert/1.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/multimap/invalidation/2.cc: Same.
	* testsuite/23_containers/map/operators/1.cc: Same.
	* testsuite/23_containers/map/invalidation/2.cc: Same.
	* testsuite/23_containers/map/invalidation/1.cc: Same.
	* testsuite/23_containers/map/insert/1.cc: Same.
	* testsuite/23_containers/list/operators/4.cc: Same.
	* testsuite/23_containers/list/operators/3.cc: Same.
	* testsuite/23_containers/list/operators/2.cc: Same.
	* testsuite/23_containers/list/operators/1.cc: Same.
	* testsuite/23_containers/list/modifiers/3.cc: Same.
	* testsuite/23_containers/list/modifiers/2.cc: Same.
	* testsuite/23_containers/list/modifiers/1.cc: Same.
	* testsuite/23_containers/list/invalidation/4.cc: Same.
	* testsuite/23_containers/list/invalidation/3.cc: Same.
	* testsuite/23_containers/list/invalidation/2.cc: Same.
	* testsuite/23_containers/list/invalidation/1.cc: Same.
	* testsuite/23_containers/list/cons/9.cc: Same.
	* testsuite/23_containers/list/cons/8.cc: Same.
	* testsuite/23_containers/list/cons/7.cc: Same.
	* testsuite/23_containers/list/cons/6.cc: Same.
	* testsuite/23_containers/list/cons/5.cc: Same.
	* testsuite/23_containers/list/cons/4.cc: Same.
	* testsuite/23_containers/list/cons/3.cc: Same.
	* testsuite/23_containers/list/cons/2.cc: Same.
	* testsuite/23_containers/list/cons/1.cc: Same.
	* testsuite/23_containers/list/capacity/1.cc: Same.
	* testsuite/23_containers/deque/operators/1.cc: Same.
	* testsuite/23_containers/deque/invalidation/4.cc: Same.
	* testsuite/23_containers/deque/invalidation/3.cc: Same.
	* testsuite/23_containers/deque/invalidation/2.cc: Same.
	* testsuite/23_containers/deque/invalidation/1.cc: Same.
	* testsuite/23_containers/deque/cons/2.cc: Same.
	* testsuite/23_containers/deque/cons/1.cc: Same.

	* src/allocator.cc: Add char, wchar_t instantiations
	to match extern template declarations in memory.h.

From-SVN: r78922
2004-03-04 18:11:08 +00:00
Paolo Carlini ced3ad4d7c locale_facets.tcc (money_put<>::_M_insert): Fix warning regression.
2004-03-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Fix warning regression.

From-SVN: r78861
2004-03-03 20:51:22 +00:00
Paolo Carlini 039e3c5c45 locale_facets.tcc (money_put<>::_M_insert): Deal properly with empty __digits and negative frac_digits, clean-up a bit.
2004-03-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Deal properly with empty __digits and negative frac_digits,
	clean-up a bit.

From-SVN: r78844
2004-03-03 18:07:23 +00:00
Jonathan Wakely 0d957d2614 documentation.html: Regenerate.
2004-03-03  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/documentation.html: Regenerate.

From-SVN: r78838
2004-03-03 15:52:54 +00:00
Paolo Carlini 0b1d67d23b re PR libstdc++/14320 (istreambuf_iterator::difference_type is not a signed integral type)
2004-03-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14320
	* include/bits/postypes.h (class streamoff): Remove, now
	streamoff is just typedef a 64 bit signed integer type.
	(class fpos): Tweak consistently.
	* testsuite/27_io/fpos/14320-1.cc: New.
	* testsuite/27_io/fpos/14320-2.cc: New.
	* testsuite/27_io/fpos/14320-3.cc: New.
	* testsuite/27_io/fpos/14320-4.cc: New.
	* testsuite/27_io/fpos/14320-5.cc: New.
	* testsuite/27_io/fpos/mbstate_t/4_neg.cc: xfail for now.

From-SVN: r78799
2004-03-03 00:22:05 +00:00
Paolo Carlini 59564c5e9a locale_facets.tcc (money_get<>::_M_extract): Reorganize a bit the main parsing loop...
2004-03-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Reorganize a bit the main parsing loop, thus early detecting
	an empty value component.
	* testsuite/22_locale/money_get/get/char/16.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/16.cc: New.

From-SVN: r78788
2004-03-02 22:25:51 +00:00
Benjamin Kosnik ec2075e962 Support automake 1.8.2
2004-03-02  Benjamin Kosnik  <bkoz@redhat.com>

	Support automake 1.8.2
	* configure.ac (AM_INIT_AUTOMAKE): Add -Wno-override.
	* po/Makefile.am (EXTRA_DIST): New.
	* po/Makefile.in: Regenerate.
	* Makefile.in: Same.
	* include/Makefile.in: Same.
	* libmath/Makefile.in: Same.
	* libsupc++/Makefile.in: Same.
	* src/Makefile.in: Same.
	* testsuite/Makefile.in: Same.

	* include/Makefile.am (${host_builddir}/gthr-posix.h): Use
	__GXX_WEAK__ instead of SUPPORTS_WEAK.
	(${host_builddir}/gthr-default.h): Same.
	(${host_builddir}/gthr.h): Same.
	* acinclude.m4 (GLIBCXX_ENABLE_THREAD): Remove
	_GLIBCXX_SUPPORTS_WEAK, as this behavior can be modified via
	-fno-weak.
	* aclocal.m4: Regenerate.
	* acconfig.h: Remove _GLIBCXX_SUPPORTS_WEAK.
	* config.h.in: Regenerate.
	* configure: Same.

From-SVN: r78770
2004-03-02 18:30:08 +00:00
Benjamin Kosnik f214923cca acinclude.m4: Quote correctly.
2004-03-01  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4: Quote correctly.
	* aclocal.m4: Regenerate.
	* linkage.m4: Same.

From-SVN: r78715
2004-03-01 19:22:28 +00:00
Benjamin Kosnik 6728336267 test.html: Add multilib RUNTESTFLAGS example.
2004-03-01  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/test.html: Add multilib RUNTESTFLAGS example.

	* docs/html/18_support/howto.html: Add bit about writing to
	stderr, mostly by Zack.

From-SVN: r78709
2004-03-01 17:42:01 +00:00
Paolo Carlini 98e953f57b locale_facets.tcc (money_get<>::_M_extract, [...]): ...
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract,
	money_get<>::do_get(string_type&)): ... and two more.

From-SVN: r78708
2004-03-01 17:29:27 +00:00
Paolo Carlini b19fb27d1e locale_facets.tcc (money_get<>::_M_extract): Fix thinkos in the switch from string_type& to string& as last argument.
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Fix thinkos in the switch from string_type& to string& as last
	argument.

From-SVN: r78707
2004-03-01 17:08:45 +00:00
Paolo Carlini 08ff96c346 locale_facets.tcc (num_get<>::_M_extract_float): Also when parsing exponent sign, first look for thousands_sep and decimal_point...
2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
	Also when parsing exponent sign, first look for thousands_sep
	and decimal_point; tweak a bit.
	* testsuite/22_locale/num_get/get/char/15.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/15.cc: New.

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int): Reorder some conditionals.

2004-03-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Consistently with numpunct, enforce the requirements in
	22.2.6.3, p3 for the thousands separators; tweak a bit.
	* testsuite/22_locale/money_get/get/char/15.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/15.cc: New.

From-SVN: r78699
2004-03-01 10:31:33 +00:00
David Billinghurst 1152b861f7 libstdc++.exp (v3-list-tests): Use testsuite_files from correct multilib blddir when running testsuite.
2004-03-01  David Billinghurst <David.Billinghurst@riotinto.com>

	* testsuite/lib/libstdc++.exp (v3-list-tests): Use
	testsuite_files from correct multilib blddir when running
	testsuite.

From-SVN: r78692
2004-03-01 04:30:49 +00:00
Phil Edwards 8b42508262 Makefile.am (check-abi, [...]): Copy the summary file to the logfile.
2004-02-29  Phil Edwards  <phil@codesourcery.com>

	* testsuite/Makefile.am (check-abi, check-abi-verbose):  Copy
	the summary file to the logfile.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r78647
2004-02-29 12:57:33 +00:00
John David Anglin 3a1a4ed26e atomicity.h (__atomic_add): Make first argument volatile.
* config/cpu/hppa/atomicity.h (__atomic_add): Make first argument
	volatile.
	* config/os/hpux/os_defines.h (_GLIBCXX_INST_ATOMICITY_LOCK): Use
	__GXX_WEAK__ instead of _GLIBCXX_SUPPORTS_WEAK.

From-SVN: r78633
2004-02-28 22:46:32 +00:00
Paolo Carlini 0e1b98cccc locale_facets.tcc (num_get<>::_M_extract_float): According to 22.2.3.1...
2004-02-28  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
	According to 22.2.3.1, p2, 'units' may be followed by 'e' with
	no 'decimal-point' in the middle: in this case too we must fix
	up __found_grouping; slightly tweak.
	* testsuite/22_locale/num_get/get/char/14.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/14.cc: New.

From-SVN: r78625
2004-02-28 20:37:54 +00:00
Eric Christopher 58adf39ce4 2.cc, [...]: Use dg-require-iconv.
2004-02-27  Eric Christopher  <echristo@redhat.com>
            Phil Edwards  <phil@codesourcery.com>

	* testsuite/22_locale/collate/compare/wchar_t/2.cc,
	testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc,
	testsuite/22_locale/collate/hash/wchar_t/2.cc,
	testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc,
	testsuite/22_locale/collate/transform/wchar_t/2.cc,
	testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc,
	testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
	Use dg-require-iconv.
	* testsuite/lib/libstdc++.exp:  Load target-supports.exp.

From-SVN: r78582
2004-02-27 22:09:23 +00:00
Phil Edwards 238345774b default.exp: Update with comments.
2004-02-27  Phil Edwards  <phil@codesourcery.com>

	* testsuite/config/default.exp:  Update with comments.
	(${tool}_target_compile):  New wrapper routine.
	* testsuite/lib/dg-options.exp:  New file, with dg-require-iconv.
	* testsuite/lib/libstdc++.exp:  Update with comments and cosmetic
	fixes.
	(load_gcc_lib, v3track):  New routines.
	(v3-init):  Rename to libstdc++_init.
	* testsuite/libstdc++-dg/normal.exp:  No longer call v3-init.
	Move DEFAULT_CXXFLAGS handling into libstdc++_init.

From-SVN: r78580
2004-02-27 22:01:32 +00:00
Benjamin Kosnik 00d04db682 atomicity.h: Include c++config.h to get defines.
2004-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* config/cpu/hppa/atomicity.h: Include c++config.h to get defines.

	* src/misc-inst.cc (_S_atomicity_lock): Move to __gnu_cxx.

	* config/os/irix/irix5.2/atomicity.h: Merge..
	* config/os/irix/irix6.5/atomicity.h: Merge..
	* config/os/irix/atomicity.h: ...into this.
	* config/os/irix/atomic_word.h: New.
	* configure.host: Set atomic_word_dir for irix.

	* hppa/atomicity.h: Change __Atomicity_lock to _Atomicity_lock.
	* i386/atomicity.h: Same.
	* m68k/atomicity.h: Same.
	* sparc/atomicity.h: Same.

From-SVN: r78577
2004-02-27 20:56:46 +00:00
David Edelsohn c284a1261d atomicity.h: Use __gnu_cxx namespace.
* config/os/aix/atomicity.h: Use __gnu_cxx namespace. Remove
        static, and inline keyworks.

From-SVN: r78574
2004-02-27 13:59:31 -05:00
Paolo Carlini a8ea738974 locale_facets.tcc (num_get<>::_M_extract_float, [...]): If appropriate, call reserve on the __tmp_gruping string.
2004-02-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, money_get<>::_M_extract): If appropriate,
	call reserve on the __tmp_gruping string.
	(num_get<>::_M_extract_float): Don't append unnecessarily a
	char() to the returned string.
	* include/bits/locale_facets.tcc: Trivial reformattings.

From-SVN: r78565
2004-02-27 14:30:19 +00:00
Paolo Carlini f4bdbead2e locale_facets.h (money_get<>::_M_extract): Change signature: now takes a plain string&.
2004-02-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (money_get<>::_M_extract):
	Change signature: now takes a plain string&.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Update consistently the definition; use the moneypunct cache
	to parse the value; use swap to change __units.
	(money_get<>::do_get(long double&)): Update call of _M_extract,
	avoid ctype::narrow, not correct wrt the standard.
	(money_get<>::do_get(string_type&)): Likewise, update call
	of _M_extract, use ctype::widen.
	* src/locale-inst.cc: Tweak instantiations of _M_extract.

From-SVN: r78562
2004-02-27 10:12:01 +00:00
Benjamin Kosnik 40fcf31b2f [multiple changes]
2004-02-26  Ian Lance Taylor  <ian@wasabisystems.com>

	* testsuite/demangle/abi_examples/01.cc: Expect error -2.
	* testsuite/demangle/abi_examples/02.cc: Likewise.
	* testsuite/demangle/regression/cw-11.cc: Likewise.
	* testsuite/demangle/regression/cw-16.cc: Change two expected
	results to match libiberty demangler output.

2004-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/10246
        * libsupc++/Makefile.am: Use libiberty demangler.
        (c_sources): Add cp-demangle.c.
        * libsupc++/Makefile.in: Regenerate.
        * src/Makefile.am (sources): Remove demangle.cc.
        * src/Makefile.in: Regenerate.
        * include/Makefile.am (bits_headers): Move demangle.h.
	(ext_headers): ...here.
        * include/Makefile.in: Regenerate.
        * include/bits/demangle.h: Move...
	* include/ext/demangle.h: ...here.
        * src/demangle.cc: Remove.

2004-02-26  Benjamin Kosnik  <bkoz@redhat.com>

        * include/bits/demangle.h: Add type template parameter to all
        templates with just an Allocator template parameter.

From-SVN: r78553
2004-02-27 03:21:16 +00:00
Benjamin Kosnik 2c5d0ae842 atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add.
2004-02-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/atomicity.h: New, forward declarations for __atomic_add
	and __exchange_and_add.
	* config/cpu/generic/atomic_word.h: New, typdef for atomic word.
	* config/cpu/cris/atomic_word.h: Same.
	* config/cpu/sparc/atomic_word.h: Same.
	* include/bits/ios_base.h (_Callback_list::_M_remove_reference):
	Qualifiy with __gnu_cxx.
	(_Callback_list::_M_add_reference): Same.
	* include/bits/locale_classes.h (locale::facet::_M_add_reference): Add.
	(locale::facet::_M_remove_reference): Same.
	(locale::_Impl::_M_add_reference): Add.
	(locale::_Impl::_M_remove_reference): Same.
	* include/bits/basic_string.h (basic_string::_Rep::_M_refcopy): Same.
	(basic_string::_Rep::_M_dispose): Same.
	* src/ios.cc (ios_base::xalloc): Same.
	* src/ios_init.cc (ios_base::Init::Init): Same.
	(ios_base::Init::~Init): Same.
	* src/locale.cc (locale:🆔:_M_id): Same.
	* config/cpu/i486/atomicity.h: Use __gnu_cxx namespace. Remove
	static, and inline keyworks.
	* config/cpu/alpha/atomicity.h: Same.
	* config/cpu/cris/atomicity.h: Same.
	* config/cpu/generic/atomicity.h: Same.
	* config/cpu/hppa/atomicity.h: Same.
	* config/cpu/i386/atomicity.h: Same.
	* config/cpu/ia64/atomicity.h: Same.
	* config/cpu/m68k/atomicity.h: Same.
	* config/cpu/mips/atomicity.h: Same.
	* config/cpu/powerpc/atomicity.h: Same.
	* config/cpu/s390/atomicity.h: Same.
	* config/cpu/sparc/atomicity.h: Same.

	* src/Makefile.am (host_sources): Add atomicity.cc.
	(atomicity.cc): New rule.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am (host_headers): Remove host atomicity.h.
	(host_headers): Add atomic_word.h.
	(bits_headers): Add bits atomicity.h.
	Change ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
	* include/Makefile.in: Regenerate.
	* configure.host (atomic_word_dir): Add.
	* configure.ac: Substitute ATOMIC_WORD_SRCDIR. Change
	ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR.
	* configure: Regenerate.
	* config/linker-map.gnu: Export __exchange_and_add, and __atomic_add.

	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

From-SVN: r78544
2004-02-27 00:49:50 +00:00
Jonathan Wakely cec0e70b44 howto.html, [...]: Fix markup, more <link> tags.
2004-02-25  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/20_util/howto.html, docs/html/20_util/allocator.html,
	docs/html/ext/howto.html, docs/html/ext/mt_allocator.html:
	Fix markup, more <link> tags.

From-SVN: r78495
2004-02-26 11:35:06 +00:00
Carlo Wood bb9f8a85b1 * bits/demangle.h
namespace __gnu_cxx::demangler
(session<Allocator>::qualifier_list_Allocator): Add
(session<Allocator>::M_qualifier_list_alloc): Add
(session<Allocator>::decode_type_with_postfix):
Use M_qualifier_list_alloc instead of calling operator new/delete.

From-SVN: r78457
2004-02-25 21:31:01 +00:00
Paolo Carlini b79cef0683 re PR libstdc++/14252 (Problems with count and iterator_traits<istreambuf_iterator<char> >::difference_type)
2004-02-24  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14252
	* include/bits/postypes.h (class streamoff): Add operator++(),
	operator++(int), operator--() and operator--(int).
	* testsuite/27_io/fpos/14252.cc: New.

From-SVN: r78388
2004-02-24 21:20:33 +00:00
Richard Sandiford 212063a844 locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex constants.
* include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds
	error in handling of hex constants.

From-SVN: r78385
2004-02-24 20:49:40 +00:00
Paolo Carlini 031e658e58 locale_facets.tcc (money_put<>::_M_insert): Prefer basic_string::append to operator+= and a temporary.
2004-02-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Prefer basic_string::append to operator+= and a temporary.

From-SVN: r78360
2004-02-24 09:37:52 +00:00
Benjamin Kosnik 6f94dea785 vterminate.cc (__gnu_cxx::__verbose_terminate_handler): Only use fputs, not write.
2004-02-23  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/vterminate.cc (__gnu_cxx::__verbose_terminate_handler):
	Only use fputs, not write.

From-SVN: r78327
2004-02-23 19:17:06 +00:00
Benjamin Kosnik 20d0a40e83 malloc_allocator.h: Add operators ==, !=.
2004-02-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/malloc_allocator.h: Add operators ==, !=.
	* include/ext/new_allocator.h: Add operators ==, !=.
	* include/ext/mt_allocator.h (__mt_alloc::tune): New.
	(__mt_alloc::_S_get_options): New.
	(__mt_alloc::_S_set_options): New.
	(__mt_alloc::_S_thread_key_destr): To _S_destroy_thread_key.
	(__mt_alloc::_S_no_of_bins): To _S_bin_size.
	Move functions out of line, simplify, format.
	* src/allocator.cc: Simplify explicit instantiations.
	* include/bits/allocator.h: Tweak.

From-SVN: r78315
2004-02-23 15:42:28 +00:00
Benjamin Kosnik f263b26e17 malloc_allocator.h: Add operators ==, !=.
2004-02-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/malloc_allocator.h: Add operators ==, !=.
	* include/ext/new_allocator.h: Add operators ==, !=.
	* include/ext/mt_allocator.h (__mt_alloc::tune): New.
	(__mt_alloc::_S_get_options): New.
	(__mt_alloc::_S_set_options): New.
	(__mt_alloc::_S_thread_key_destr): To _S_destroy_thread_key.
	(__mt_alloc::_S_no_of_bins): To _S_bin_size.
	Move functions out of line, simplify, format.
	* src/allocator.cc: Simplify explicit instantiations.
	* include/bits/allocator.h: Tweak.

From-SVN: r78314
2004-02-23 15:41:43 +00:00
Paolo Carlini 20da06efdc locale_facets.tcc (money_put<>::_M_insert): Restructure formatting of value component...
2004-02-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_put<>::_M_insert):
	Restructure formatting of value component, first dealing with
	the non-decimal digits; use reserve.

2004-02-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (class money_get): Inherit
	from money_base too; tweak declaration of _M_extract, now
	parameterized on _Intl too.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract):
	Update definition to use the cache; call reserve on __res to
	avoid multiple reallocations; fix parsing of sign component
	according to 22.2.6.1.2, p3.
	(money_get<>::do_get(long double&),
	money_get<>::do_get(string_type&)): Update calls of _M_extract.
	* src/locale-inst.cc:  Add instantiations of
	money_get::_M_extract<false> and money_get::_M_extract<true>.
	* testsuite/22_locale/money_get/get/char/14.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/14.cc: Ditto.

From-SVN: r78253
2004-02-22 11:13:27 +00:00
Mark Mitchell afc3bb58d5 * libsupc++/vterminate.cc
(__gnu_cxx::__verbose_terminate_handler): Guard against recursive
	calls to terminate.
	* src/demangle.cc (__cxa_demangle): Wrap in try-catch block.

From-SVN: r78235
2004-02-21 20:59:26 +00:00
Mark Mitchell e1efc7a028 testsuite_hooks.cc (__gnu_test::set_memory_limits): Do not set RLIMIT_AS on HP-UX.
* testsuite/testsuite_hooks.cc (__gnu_test::set_memory_limits): Do
	not set RLIMIT_AS on HP-UX.

From-SVN: r78233
2004-02-21 20:34:38 +00:00
Paolo Carlini fe932e504b locale_facets.h (class money_base): Add { _S_minus, _S_zero, _S_end } enum, _S_atoms.
2004-02-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (class money_base): Add { _S_minus,
	_S_zero, _S_end } enum, _S_atoms.
	(struct __moneypunct_cache<>): Parameterize on _Intl too; add
	_M_grouping_size, _M_curr_symbol_size, _M_positive_sign_size,
	_M_negative_sign_size, _M_atoms; tweak constructor consistently.
	(__moneypunct_cache<>::~__moneypunct_cache): Update.
	(__moneypunct_cache<>::_M_cache): Fill the cache.
	(class moneypunct): Tweak __cache_type typedef.
	(class money_put): Inherit from money_base too; tweak declaration
	of _M_insert, now parameterized on _Intl.
	* include/bits/locale_facets.tcc
	(struct __use_cache<__moneypunct_cache<_CharT, _Intl> >): New.
	(money_put<>::_M_insert): Update definition to use the cache;
	call reserve on __res to avoid multiple reallocations.
	(money_put<>::do_put(long double),
	money_put<>::do_put(const string_type&): Update calls of _M_insert.
	* config/locale/generic/monetary_members.cc
	(moneypunct<char, true>::_M_initialize_moneypunct,
	moneypunct<char, false>::_M_initialize_moneypunct,
	moneypunct<wchar_t, true>::_M_initialize_moneypunct,
	moneypunct<wchar_t, false>::_M_initialize_moneypunct): Update.
	* config/locale/gnu/monetary_members.cc: Likewise.
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true>::~moneypunct(),
	moneypunct<wchar_t, false>::~moneypunct()): Likewise.
	* src/globals_locale.cc: Tweak fake_money_cache_c.
	* src/locale-inst.cc: Add instantiations for
	money_put::_M_insert<false> and money_put::_M_insert<true> and
	__moneypunct_cache<C, false>, __moneypunct_cache<C, true>.
	* src/locale_facets.cc: Define money_base::_S_atoms.
	* src/locale_init.cc: Update placement new of
	__moneypunct_cache<char, false>, __moneypunct_cache<char, true>,
	__moneypunct_cache<wchar_t, false>, __moneypunct_cache<wchar_T, true>.

	* config/locale/generic/numeric_members.cc: Clean up.
	* config/locale/gnu/numeric_members.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.

From-SVN: r78216
2004-02-21 09:26:35 +00:00
Mark Mitchell f196bdc447 9533-1.cc: Open FIFO for writing with ios_base::in|ios_base::out.
* testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Open
	FIFO for writing with ios_base::in|ios_base::out.
	* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
	* testsuite/27_io/objects/char/7.cc: Likewise.
	* testsuite/27_io/objects/char/9661-1.cc: Open FIFO for writing
	with "r+".

From-SVN: r78195
2004-02-20 23:51:07 +00:00
David Edelsohn 2df93cf3c4 2.cc: Change input-charset from iso-8859-1 to ISO8859-1.
* 22_locale/collate/compare/wchar_t/2.cc: Change input-charset
	from iso-8859-1 to ISO8859-1.
	* 22_locale/collate/compare/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/compare/wchar_t/wrapped_locale.cc: Same.
	* 22_locale/collate/hash/wchar_t/2.cc: Same.
	* 22_locale/collate/hash/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/hash/wchar_t/wrapped_locale.cc: Same.
	* 22_locale/collate/transform/wchar_t/2.cc: Same.
	* 22_locale/collate/transform/wchar_t/wrapped_env.cc: Same.
	* 22_locale/collate/transform/wchar_t/wrapped_locale.cc: Same.

From-SVN: r78124
2004-02-19 17:07:55 -05:00
Paolo Carlini 2ddf25f217 locale_facets.h (money_get<>::_M_extract): New, helper for do_get.
2004-02-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (money_get<>::_M_extract):
	New, helper for do_get.
	(money_put<>::_M_insert): Likewise, for do_put.
	* include/bits/locale_facets.tcc (money_get<>::_M_extract,
	money_put<>::_M_insert): Define.
	(money_get<>::do_get(long double&), money_get<>::do_get(
	string_type&), money_put::do_put(long double),
	money_put::do_put(const string_type&)): Use the helpers.

From-SVN: r78037
2004-02-18 16:39:13 +00:00
Paolo Carlini 94b8de97c4 basic_file_stdio.cc (__gnu_internal::xwritev): Rewrite, avoiding recursion.
2004-02-18  Paolo Carlini  <pcarlini@suse.de>

	* config/io/basic_file_stdio.cc (__gnu_internal::xwritev):
	Rewrite, avoiding recursion.
	(__gnu_internal::xwrite): Minor tweaks.

From-SVN: r78015
2004-02-18 08:36:27 +00:00
Stefan Olsson 4d0bdcd6e1 mt_allocator.h: Removed the last pointer.
2004-02-17  Stefan Olsson  <stefan@xapa.se>

	* include/ext/mt_allocator.h: Removed the last
	pointer. Deallocated blocks are now added to the front of
	freelists as proposed by Felix Yen.  This gives roughly 10%
	performance boost and saves some memory.
	* docs/html/ext/mt_allocator.html: Change due to that deallocated
	blocks now are added to the front of freelists. The reason to this
	approach is also explained.

From-SVN: r78009
2004-02-18 01:21:10 +00:00
Paolo Carlini 6d4925e368 locale_facets.tcc (num_get<>::_M_extract_float, [...]): Simplify grouping fidelity conditional.
2004-02-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
	num_get<>::_M_extract_int, money_get<>::do_get): Simplify
	grouping fidelity conditional.

From-SVN: r77948
2004-02-17 11:19:25 +00:00
Paolo Carlini 3e9b6cf4e0 13858.cc: Qualify exception with std::.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/char/13858.cc:
	Qualify exception with std::.
	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

From-SVN: r77913
2004-02-16 19:28:06 +00:00
Paolo Carlini 835abbf7f0 13189.cc: Don't check for now that the catch block is not reached.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/ext/enc_filebuf/char/13189.cc: Don't check
	for now that the catch block is not reached.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Likewise.

From-SVN: r77906
2004-02-16 17:48:12 +00:00
Paolo Carlini b7e64db2a4 locale_facets.tcc (money_get::do_get(string_type&)): Fix parsing of the remaining sign characters.
2004-02-16  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
	Fix parsing of the remaining sign characters.
	* 22_locale/money_get/get/char/2.cc: Tweak: now, correctly,
	the input is scanned 'til eof.
	* 22_locale/money_get/get/char/4.cc: Likewise.
	* 22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* 22_locale/money_get/get/wchar_t/4.cc: Likewise.
	* 22_locale/money_get/get/char/8.cc: Tweak: override do_neg_format,
	not do_pos_format: the former is the only one that matters during
	input.
	* 22_locale/money_get/get/wchar_t/8.cc: Likewise.

	* 22_locale/money_get/get/char/6.cc: Minor tweak.
	* 22_locale/money_get/get/wchar_t/6.cc: Likewise.

From-SVN: r77896
2004-02-16 16:46:26 +00:00
David Asher 230377dc69 re PR libstdc++/11352 (crash while internal padding numeric 0)
2004-02-15  David Asher  <david.asher@cavium.com>

	PR libstdc++/11352
	* include/bits/locale_facets.tcc (__pad<>::_S_pad): Don't
	access __olds beyond __oldlen.

From-SVN: r77858
2004-02-15 17:19:00 +00:00
Paolo Carlini 45cbe93c0e 9182-2.cc: Make sure the exception is actually thrown.
2004-02-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Make
	sure the exception is actually thrown.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

From-SVN: r77828
2004-02-14 20:46:14 +00:00
Paolo Carlini ac3cadf042 re PR libstdc++/13858 (Bad error handling in basic_filebuf::imbue)
2004-02-14  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13858
	* include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external):
	In case of conversion errors, throw ios_failure; simplify.
	* testsuite/27_io/basic_filebuf/overflow/char/13858.cc: New.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/13858.cc: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Tweak,
	previously we didn't throw in case of conversion errors, instead
	just returned eof().
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

	* include/bits/fstream.tcc (basic_filebuf<>::overflow):
	Trivial simplification of a conditional.

From-SVN: r77812
2004-02-14 19:04:00 +00:00
Paolo Carlini 2e9a1f6b05 PR libstdc++/13731 (final part: writev)
2004-02-12  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13731 (final part: writev)
	* config/io/basic_file_stdio.cc (__gnu_internal::xwrite):
	New, a wrapper around writev() handling partial writes.
	(__basic_file<char>::xwrite): Move to __gnu_internal and make
	static.
	(__basic_file<char>::xsputn): Update call.
	(__basic_file<char>::xsputn_2): Likewise.
	* config/io/basic_file_stdio.h (__basic_file<char>::write):
	Don't declare, now static.

From-SVN: r77717
2004-02-12 18:24:07 +00:00
Benjamin Kosnik 1c86f39d32 [multiple changes]
2004-02-11  Stefan Olsson  <stefan@xapa.se>

	* docs/html/ext/mt_allocator.html: New.

2004-02-11  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/20_util/allocator.html: New file, consolidate
	allocator information here. Revamp.
	* docs/html/documentation.html: Change links.
	* docs/html/20_util/howto.html: Same.
	* docs/html/ext/howto.html: Same.

From-SVN: r77687
2004-02-12 01:11:48 +00:00
Paolo Carlini 98e9678463 PR libstdc++/13731 (first part: write)
2004-02-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13731 (first part: write)
	* config/io/basic_file_stdio.h (__basic_file<char>::xwrite):
	New, declare.
	* config/io/basic_file_stdio.cc (__basic_file<char>::xwrite):
	Define it: a wrapper around write() handling partial write.
	(__basic_file<char>::xsputn): Use it.
	(__basic_file<char>::xsputn_2): Likewise.

From-SVN: r77680
2004-02-12 00:05:35 +00:00
Paolo Carlini a2af66c186 re PR libstdc++/14078 (Manipulators are slow)
2004-02-10  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/14078
	* include/std/std_istream.h (operator>>(__istream_type& (*)
	(__istream_type&)), operator>>(__ios_type& (*)(__ios_type&)),
	operator>>(ios_base& (*)(ios_base&))): Declare inline.
	* include/std/std_ostream.h (operator<<(__ostream_type& (*)
	(__ostream_type&)), operator<<(__ios_type& (*)(__ios_type&)),
	operator<<(ios_base& (*) (ios_base&))): Likewise.
	* testsuite/performance/27_io/fmtflags_manipulators.cc: New.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r77650
2004-02-11 12:08:23 +00:00
Loren J. Rittle d318a8ba74 re PR libstdc++/14097 ([3.4 only] Severe disparity between stdio_filebuf and stdio_sync_filebuf.)
PR libstdc++/14097
	* config/linker-map.gnu: Add typeinfo and typeinfo name for
	__gnu_cxx::stdio_filebuf<char, std::char_traits<char> >.

From-SVN: r77636
2004-02-11 05:21:57 +00:00
Loren J. Rittle 64bd39ccc7 re PR libstdc++/14098 ([3.4 only] typeinfo issue with __gnu_cxx::stdio_sync_filebuf)
PR libstdc++/14098
	* config/linker-map.gnu: Add typeinfo and typeinfo name for
	__gnu_cxx::stdio_sync_filebuf<char, std::char_traits<char> >.

From-SVN: r77635
2004-02-11 05:03:13 +00:00
Loren J. Rittle a39c16dd5b * include/ext/pool_allocator.h: Include c++config.h.
From-SVN: r77577
2004-02-10 00:43:04 +00:00
Stefan Olsson 1ef0031284 mt_allocator.h: thread_id is unused in non threaded applications and now has a ifdef to remove...
2004-02-09  Stefan Olsson  <stefan@xapa.se>

	* include/ext/mt_allocator.h: thread_id is unused in non threaded
	applications and now has a ifdef to remove it completely on
	compilers without thread support. Include stdlib.h due to a
	compiler warning on getenv().

From-SVN: r77576
2004-02-10 00:31:53 +00:00
Paul Brook 1b81e1b544 configure.host: Explicitly check for atomicity.h file.
2004-02-09  Paul Brook  <paul@codesourcery.com>

	* libstdc++-v3/configure.host: Explicitly check for atomicity.h file.

From-SVN: r77570
2004-02-09 23:51:02 +00:00
Paolo Carlini cf0d2c4044 re PR libstdc++/14071 (locale::global doesn't always call setlocale)
2004-02-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14071
	* src/locale_init.cc (locale::global(const locale&)): Use
	locale::name() in order to decide whether calling setlocale.
	* testsuite/22_locale/locale/global_locale_objects/14071.cc: New.

	* include/bits/locale_classes.h (locale::_Impl::_M_check_same_name()):
	Avoid computing &= unnecessarily.

From-SVN: r77568
2004-02-09 23:10:47 +00:00
James E Wilson 664fc5df4a re PR libstdc++/5625 ([mips] exception unwinding creates invalid pointer on mips)
PR libstdc++/5625
* libsuspc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
__builtin_extend_pointer.

From-SVN: r77555
2004-02-09 13:20:33 -08:00
Paolo Carlini 86fd2b512a re PR libstdc++/14072 (basic_ios::imbue leaves dangling pointers)
2004-02-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/14072
	* include/bits/basic_ios.tcc (basic_ios<>::_M_cache_locale):
	Don't leave dangling pointers.
	* testsuite/27_io/basic_ios/imbue/14072.cc: New.
	* testsuite/22_locale/numpunct/members/pod/2.cc: Tweak, the num_put
	facet is needed in the final test.

From-SVN: r77526
2004-02-09 09:02:52 +00:00
Bernardo Innocenti f19e9e4d16 crossconfig.m4: Don't enable _GLIBCXX_USE_LFS on *-uclinux*.
* crossconfig.m4: Don't enable _GLIBCXX_USE_LFS on *-uclinux*.
	* configure: Regenerate.

From-SVN: r77523
2004-02-09 08:06:35 +01:00
Richard Henderson c38628062d re PR libstdc++/14026 (std::uncaught_exception is true although there are no uncaught exceptions (rethrow, ghost exception))
PR libstdc++/14026
        * libsupc++/eh_catch.cc (__cxa_begin_catch): Don't adjust
        uncaughtExceptions during nested catch rethrow.
        * testsuite/18_support/14026.cc: New.

From-SVN: r77492
2004-02-08 10:01:23 -08:00
Paolo Carlini fd95f498f3 basic_string.tcc (assign(const _CharT*, size_type)): When working in place remember to set the state to sharable (otherwise...
2004-02-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
	When working in place remember to set the state to sharable
	(otherwise, _M_mutate does it).

From-SVN: r77487
2004-02-08 17:11:07 +00:00
Bernardo Innocenti ed6814f7b3 Remove trailing whitespace (see ChangeLog for longwinded description).
From-SVN: r77479
2004-02-08 05:46:42 +01:00
Paolo Carlini eee54836b1 basic_string.h: Fix comment.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h: Fix comment.

From-SVN: r77428
2004-02-06 23:02:45 +00:00
Paolo Carlini 15d7206087 stl_construct.h: Wrap overlong lines, reformat according to the coding standards.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_construct.h: Wrap overlong lines, reformat
	according to the coding standards.
	* include/bits/stl_pair.h: Likewise.
	* include/bits/stl_raw_storage_iter.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/stl_uninitialized.h: Likewise.
	* include/bits/stream_iterator.h: Likewise.
	* include/bits/streambuf_iterator.h: Likewise.
	* include/bits/type_traits.h: Likewise.

From-SVN: r77425
2004-02-06 21:32:48 +00:00
Loren J. Rittle fbdf188d78 Add commit message included with files.
From-SVN: r77413
2004-02-06 19:20:30 +00:00
Paolo Carlini c5dd98f3ec 9507.cc: Adjust timings.
2004-02-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/open/char/9507.cc:
	Adjust timings.

From-SVN: r77392
2004-02-06 11:45:23 +00:00
Loren J. Rittle 462f4a816b * scripts/check_performance: Support PCH.
From-SVN: r77360
2004-02-06 00:51:34 +00:00
Geoffrey Keating 0314451df3 Index: libf2c/ChangeLog
Thu Feb  5 15:08:08 2004  Geoffrey Keating  <geoffk@apple.com>

	PR 12179
	* aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Use 'gcc', not 'gcc-lib'.
	Add comment about poorly-named variables.
	* Makefile.in (libsubdir): Use 'gcc', not 'gcc-lib'.
	* configure: Regenerate.

Index: libstdc++-v3/ChangeLog
2004-02-05  Geoffrey Keating  <geoffk@apple.com>

	PR 12179
	* .cvsignore: New.
	* acinclude.m4 (GLIBCXX_EXPORT_INSTALL_INFO): Use 'gcc', not
	'gcc-lib'.  Add comment about poorly-named variables.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r77351
2004-02-05 23:19:54 +00:00
Paolo Carlini d9010fcacc locale_facets.tcc (money_get::do_get(string_type&)): Thousands-sep are always optional...
2004-02-05  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (money_get::do_get(string_type&)):
	Thousands-sep are always optional; thousands-sep are not allowed
	after the decimal_point.
	* testsuite/22_locale/money_get/get/char/12.cc: New.
	* testsuite/22_locale/money_get/get/char/13.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/12.cc: New.
	* testsuite/22_locale/money_get/get/wchar_t/13.cc: New.

	* testsuite/22_locale/money_get/get/char/1.cc: Clean-up.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.

	* testsuite/22_locale/money_get/get/char/9.cc: Fix citation from
	the standard.
	* testsuite/22_locale/money_get/get/wchar_t/9.cc: Likewise.

From-SVN: r77339
2004-02-05 20:13:37 +00:00
Richard Sandiford d232925f0b os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T): Define.
* config/os/irix/irix6.5/os_defines.h (_GLIBCXX_FIONREAD_TAKES_OFF_T):
	Define.
	* config/io/basic_file_stdio.cc (__basic_file<char>::showmanyc): Use
	it to decide whether FIONREAD should take an off_t or int argument.

From-SVN: r77336
2004-02-05 20:11:32 +00:00
Paolo Carlini 92ff3e4314 stl_function.h: Minor formatting changes.
2004-02-05  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_function.h: Minor formatting changes.

From-SVN: r77316
2004-02-05 15:39:16 +00:00
Zack Weinberg 9fe7e2b747 Revert previous change to config/abi/*/baseline_symbols.txt.
From-SVN: r77305
2004-02-05 07:25:58 +00:00
Benjamin Kosnik 6a734d618f basic_file_stdio.cc (__gnu_internal::fopen_mode): New function.
2004-02-04  Benjamin Kosnik  <bkoz@redhat.com>
	    Zack Weinberg  <zack@codesourcery.com>

	* config/io/basic_file_stdio.cc (__gnu_internal::fopen_mode):
	New function.
	(__basic_file<char>::sys_open, __basic_file<char>::open): Use it.
	(__basic_file<char>::_M_open_mode): Delete.
	* config/io/basic_file_stdio.cc: Delete declaration of _M_open_mode.

	* testsuite/27_io/basic_filebuf/close/char/9964.cc
	* testsuite/27_io/basic_filebuf/open/char/9507.cc:
	Correct flags to filebuf::open calls.

	* config/abi/alpha-freebsd5/baseline_symbols.txt
	* config/abi/alpha-linux-gnu/baseline_symbols.txt
	* config/abi/hppa-linux-gnu/baseline_symbols.txt
	* config/abi/i386-freebsd4/baseline_symbols.txt
	* config/abi/i386-freebsd5/baseline_symbols.txt
	* config/abi/i486-linux-gnu/baseline_symbols.txt
	* config/abi/ia64-linux-gnu/baseline_symbols.txt
	* config/abi/mips-linux-gnu/baseline_symbols.txt
	* config/abi/sparc-freebsd5/baseline_symbols.txt
	* config/abi/sparc-linux-gnu/baseline_symbols.txt
	* config/abi/x86_64-linux-gnu/baseline_symbols.txt:
	Remove entry for __basic_file<char>::_M_open_mode.

From-SVN: r77298
2004-02-05 05:24:18 +00:00
Loren J. Rittle f63fd68beb * testsuite/performance/20_util/allocator/insert.cc (main): Tweak.
From-SVN: r77293
2004-02-05 03:52:41 +00:00
Benjamin Kosnik de8a2f8702 [multiple changes]
2004-02-04  Felix Yen  <fwy@alumni.brown.edu>

	* testsuite/performance/20_util/producer_consumer.cc: New.
	* testsuite/performance/20_util/allocator/insert_insert.cc: Two loops.

2004-02-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/20_util/allocator.cc: Move to..
	* testsuite/performance/20_util/allocator/insert.cc: ...here.
	* testsuite/performance/20_util/allocator_thread.cc: Move to...
	* testsuite/performance/20_util/allocator/insert_insert.cc: ...here.
	* testsuite/performance/20_util/allocator_map_thread.cc: Move to...
	* testsuite/performance/20_util/allocator/map_thread.cc: ...here.

From-SVN: r77285
2004-02-05 01:33:07 +00:00
Jonathan Wakely 772fec9a0e index.html: Recommend using LD_LIBRARY_PATH.
2004-02-04  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.html: Recommend using LD_LIBRARY_PATH.
	* docs/html/faq/index.txt: Regenerate.

From-SVN: r77258
2004-02-04 17:45:18 +00:00
Dhruv Matani 56766e0db5 debug_allocator.h: _M_extra now stands for the number of extra objects instead of the number of...
2004-02-04  Dhruv Matani  <dhruvbird@gmx.net>

	* include/ext/debug_allocator.h: _M_extra now stands for the
	number of extra objects instead of the number of extra bytes.
	(debug_allocator::allocate): Adjust.
	(debug_allocator::deallocate): Adjust.

	* include/ext/pool_allocator.h: Fix typo.

From-SVN: r77256
2004-02-04 17:37:10 +00:00
Felix Yen 2226963242 allocator.cc: Add map, deque, set tests.
2004-02-03  Felix Yen  <fwy@alumni.brown.edu>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/20_util/allocator.cc: Add map,
	deque, set tests.
	* testsuite/performance/20_util/allocator_thread.cc: Same.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r77225
2004-02-04 06:21:21 +00:00
Paolo Carlini 129e921059 basic_string.h (insert(iterator)): Remove, non-standard and already scheduled for removal.
2004-02-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (insert(iterator)): Remove,
	non-standard and already scheduled for removal.

From-SVN: r77198
2004-02-03 23:34:52 +00:00
Paolo Carlini 83042fcaec stl_iterator_base_funcs.h: Minor formatting and indentation tweaks.
2004-02-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_iterator_base_funcs.h: Minor formatting
	and indentation tweaks.
	* include/bits/stl_iterator_base_types.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_tempbuf.h: Likewise.

From-SVN: r77182
2004-02-03 17:59:05 +00:00
Jerry Quinn 06a81b60c2 gslice.h, [...]: Update copyright years.
2004-02-02  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/gslice.h, include/bits/gslice_array.h,
	include/bits/indirect_array.h, include/bits/mask_array.h,
	include/bits/slice_array.h, include/bits/stl_numeric.h,
	include/std/std_valarray.h:  Update copyright years.

From-SVN: r77156
2004-02-03 04:01:15 +00:00
Jerry Quinn 7fb397a4b8 gslice.h (gslice): Document.
2004-02-02  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/gslice.h (gslice):  Document.
	* include/bits/gslice_array.h (gslice_array):  Document.
	* include/bits/indirect_array (indirect_array):  Document.
	* include/bits/mask_array (mask_array):  Document.
	* include/bits/slice_array.h (slice,slice_array):  Document.
	* include/bits/stl_numeric.h (accumulate, inner_product, partial_sum,
	adjacent_difference):  Document
	* include/std/std_valarray.h (valarray):  Document.

From-SVN: r77153
2004-02-03 03:33:24 +00:00
Benjamin Kosnik 7f7fb4ef6a howto.html: Move verbose terminate documentation...
2004-02-02  Benjamin Kosnik  <bkoz@redhat.com>

        * docs/html/19_diagnostics/howto.html: Move verbose terminate
        documentation...
        * docs/html/18_support/howto.html: Here.
        * docs/html/documentation.html: Add reference here.

From-SVN: r77150
2004-02-03 01:26:12 +00:00
Paolo Carlini 9924f721bf c++locale_internal.h: Remove prototypes of no longer used GLIBC thread locale functions.
2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/c++locale_internal.h: Remove prototypes
	of no longer used GLIBC thread locale functions.

From-SVN: r77140
2004-02-02 23:45:34 +00:00
Eric Christopher 2ba43229d3 Fix date thinko on prev patch.
From-SVN: r77138
2004-02-02 22:50:10 +00:00
Eric Christopher 16dd5cfeb8 [multiple changes]
2004-02-02  Eric Christopher  <echristo@redhat.com>
            Zack Weinberg  <zack@codesourcery.com>

        * c-opts.c (c_common_handle_option): Add -finput-charset.
        * c.opt: Ditto.
        * cppcharset.c (one_iso88591_to_utf8): Remove.
        (convert_iso88591_utf8): Ditto.
        (conversion_tab): Remove 8859-1 converter.
        (_cpp_input_to_utf8): Remove.
        (_cpp_init_iconv_buffer): Ditto.
        (_cpp_close_iconv_buffer): Ditto.
        (_cpp_convert_input): New function.
        (_cpp_default_encoding): Ditto.
        * cpphash.h: Add/remove prototypes for above.
        * cppfiles.c (read_file_guts): Use _cpp_convert_input.
        * cppinit.c (cpp_create_reader): Use _cpp_default_encoding
        for narrow execution and input character sets.
        * cpplib.c (cpp_push_buffer): Delete uses of removed functions.
        * doc/cppopts.texi: Document -finput-charset.

2004-02-02 Eric Christopher  <echristo@redhat.com>
           Zack Weinberg  <zack@codesourcery.com>

        * gcc.c-torture/execute/wchar_t-1.c: Add -finput-charset.

2004-01-29  Eric Christopher  <echristo@redhat.com>
            Zack Weinberg  <zack@codesourcery.com>

        * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use
        -finput-charset.
        * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto.
        * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto
        * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto.
        * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto.
        * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto.
        * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto.
        * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto.
        * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
        Ditto.

From-SVN: r77136
2004-02-02 20:20:58 +00:00
Paolo Carlini 7c92015149 stl_function.h: Additional minor tweaks.
2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_function.h: Additional minor tweaks.
	* include/bits/stl_multiset.h: Likewise.

	* include/bits/stl_queue.h: Minor tweaks.

From-SVN: r77125
2004-02-02 16:35:09 +00:00
Paolo Carlini dcec0389d1 PR libstdc++/13976 (continued)
2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13976 (continued)
	* include/ext/malloc_allocator.h (malloc_allocator::deallocate):
	Make the second parameter unnamed, to void unused parameter
	warnings.
	* include/ext/new_allocator.h (new_allocator::deallocate): Ditto.

From-SVN: r77113
2004-02-02 13:04:36 +00:00
Paolo Carlini 90f8b69248 re PR libstdc++/13976 (ext/new_allocator.h:81: warning: unused parameter '__h')
2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13976
	* include/ext/malloc_allocator.h (malloc_allocator::allocate):
	Make the second parameter unnamed, to void unused parameter
	warnings.
	* include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
	* include/ext/new_allocator.h (new_allocator::allocate): Ditto.

From-SVN: r77111
2004-02-02 12:39:55 +00:00
Paolo Carlini 737ab798c5 stl_algo.h: Additional minor tweaks.
2004-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h: Additional minor tweaks.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_tree.h: Likewise.

From-SVN: r77082
2004-02-01 23:19:55 +00:00
Paolo Carlini 64ebadacc4 vector.tcc (vector::_M_insert_aux(iterator)): Remove, unused.
2004-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/vector.tcc (vector::_M_insert_aux(iterator)):
	Remove, unused.

From-SVN: r77081
2004-02-01 22:14:43 +00:00
Paolo Carlini afd4cbbb50 stl_function.h: Additional minor tweaks.
2004-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_function.h: Additional minor tweaks.

From-SVN: r77078
2004-02-01 17:56:06 +00:00
Paolo Carlini f6592a9e2c deque.tcc: Wrap overlong lines...
2004-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/deque.tcc: Wrap overlong lines, constify
	a few variables, reformat according to the coding standards.
	* include/bits/list.tcc: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_function.h: Likewise.
	* include/bits/stl_iterator.h: Likewise.
	* include/bits/stl_iterator_base_funcs.h: Likewise.
	* include/bits/stl_iterator_base_types.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_relops.h: Likewise.
	* include/bits/stl_set.h: Likewise.

From-SVN: r77077
2004-02-01 17:34:44 +00:00
Paolo Carlini 62e6765158 stl_bvector.h: Wrap overlong lines...
2004-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_bvector.h: Wrap overlong lines, constify
	a few variables, reformat according to the coding standards.
	* include/bits/stl_tree.h: Likewise.

From-SVN: r77065
2004-02-01 11:25:21 +00:00
Paolo Carlini 8f7ca398ca stl_algo.h: Minor additional reformat, add copyright year.
2004-01-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h: Minor additional reformat, add
	copyright year.
	* include/bits/stl_algobase.h: Add copyright year.

From-SVN: r77058
2004-01-31 23:51:44 +00:00
Paolo Carlini ffa67767d0 stl_algo.h: Wrap overlong lines...
2004-01-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h: Wrap overlong lines, constify
	a few variables, reformat according to the coding standards.
	* include/bits/stl_algobase.h: Likewise.
	* include/bits/stl_heap.h: Likewise.

From-SVN: r77050
2004-01-31 21:37:11 +00:00
Paolo Carlini 8de63ee0d7 basic_string.h (_Rep::operator[]): Remove, unused.
2004-01-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_Rep::operator[]): Remove, unused.

	* include/bits/basic_string.h: Fix two comments.

From-SVN: r77044
2004-01-31 17:50:46 +00:00
Per Bothner af3fb3d6dc 2004-01-31 Per Bothner <per@bothner.com>
* include/ext/mt_allocator.h
	(__mt_alloc::_S_thread_freelist_mutex): Guard with
	__GTHREAD_MUTEX_INIT.

From-SVN: r77042
2004-01-31 17:38:45 +00:00
Paolo Carlini 24f330691d basic_string.tcc (_Rep::_S_create): Minor tweak.
2004-01-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.

From-SVN: r77035
2004-01-31 15:39:52 +00:00
Paolo Carlini 7c960b3dff 6.cc: New.
2004-01-30  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/21_strings/basic_string/cons/char/6.cc: New.
	* testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
	* testsuite/performance/21_strings/string_cons_input_iterator.cc:
	New.

From-SVN: r77006
2004-01-30 23:26:13 +00:00
Felix Yen 7b1d1edf99 allocator_thread.cc (do_loop): Don't use clear, but instead assign.
2004-01-30  Felix Yen  <fwy@alumni.brown.edu>

	* testsuite/performance/20_util/allocator_thread.cc (do_loop):
	Don't use clear, but instead assign. Use insert.

From-SVN: r76979
2004-01-30 18:14:42 +00:00
Benjamin Kosnik c9732ce7d5 demangle.cc: Add instantiations.
2004-01-30  Benjamin Kosnik  <bkoz@redhat.com>

	* src/demangle.cc: Add instantiations.
	* src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
	* src/Makefile.in: Regenerate.

From-SVN: r76978
2004-01-30 17:54:10 +00:00
David Edelsohn 25d244475b allocator.cc: Protect _S_get_thread_id() and _S_thread_key_destr() with #ifdef __GTHREADS.
* src/allocator.cc: Protect _S_get_thread_id() and
        _S_thread_key_destr() with #ifdef __GTHREADS.

From-SVN: r76977
2004-01-30 12:45:01 -05:00
Paolo Carlini 33e95e9d04 Reshuffle performance testsuite.
2004-01-30  Paolo Carlini  <pcarlini@suse.de>

	Reshuffle performance testsuite.
	* testsuite/performance/allocator.cc, allocator_map_thread.cc,
	allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
	cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
	fstream_seek_write.cc, ifstream_extract_float.cc,
	ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
	list_create_fill_sort.cc, map_create_fill.cc,
	narrow_widen_char.cc, narrow_widen_wchar_t.cc,
	ofstream_insert_float.cc, ofstream_insert_int.cc,
	string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
	wchar_t_out.cc: Split into...
	* testsuite/performance/20_util/allocator.cc: New.
	* testsuite/performance/20_util/allocator_map_thread.cc: New.
	* testsuite/performance/20_util/allocator_thread.cc: New.
	* testsuite/performance/21_strings/string_append: New.
	* testsuite/performance/22_locale/is_wchar_t.cc: New.
	* testsuite/performance/22_locale/narrow_widen_char.cc: New.
	* testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
	* testsuite/performance/22_locale/wchar_t_in.cc: New.
	* testsuite/performance/22_locale/wchar_t_length.cc: New.
	* testsuite/performance/22_locale/wchar_t_out.cc: New.
	* testsuite/performance/23_containers/container_benchmark.cc: New.
	* testsuite/performance/23_containers/list_create_fill_sort.cc: New.
	* testsuite/performance/23_containers/map_create_fill.cc: New.
	* testsuite/performance/26_numerics/complex_norm.cc: New.
	* testsuite/performance/27_io/cout_insert_int.cc: New.
	* testsuite/performance/27_io/filebuf_copy.cc: New.
	* testsuite/performance/27_io/filebuf_sputc.cc: New.
	* testsuite/performance/27_io/fstream_seek_write.cc: New.
	* testsuite/performance/27_io/ifstream_extract_float.cc: New.
	* testsuite/performance/27_io/ifstream_extract_int.cc: New.
	* testsuite/performance/27_io/ifstream_getline.cc: New.
	* testsuite/performance/27_io/ofstream_insert_float.cc: New.
	* testsuite/performance/27_io/ofstream_insert_int.cc: New.

From-SVN: r76974
2004-01-30 17:06:42 +00:00
Paolo Carlini d1615643e5 basic_string.tcc (_Rep::_S_create): Never allocate a string bigger than max_size()...
2004-01-30  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_Rep::_S_create):
	Never allocate a string bigger than max_size(); always keep
	__capacity and __size in sync to avoid memory leaks at
	deallocation time.

From-SVN: r76955
2004-01-30 13:23:42 +00:00
Paolo Carlini 690495b0fc basic_string.tcc (_S_construct(_InIterator, _InIterator, const _Alloc&, input_iterator_tag)): Simplify the double loop, streamline.
2004-01-30  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_S_construct(_InIterator,
	_InIterator, const _Alloc&, input_iterator_tag)): Simplify
	the double loop, streamline.

	* include/bits/basic_string.tcc: Very minor tweaks.

From-SVN: r76937
2004-01-30 09:58:45 +00:00
Loren J. Rittle f64f44069c check_performance: Only compile with $THREAD_FLAG when test is marked to require it.
* scripts/check_performance: Only compile with $THREAD_FLAG
	when test is marked to require it.  Allow multiple
	compilations/executions of marked tests.
	* testsuite/testsuite_performance.h (report_performance):
	Report dynamic thread support status.
	(report_header): Likewise.
	* testsuite/performance/allocator.cc: Stabilize iteration
	count.  Support more allocators.  Mark each allocator test to
	run and report independently.
	* testsuite/performance/allocator_map_thread.cc: Likewise.
	* testsuite/performance/allocator_thread.cc: Likewise.

From-SVN: r76932
2004-01-30 08:24:27 +00:00
Stephen M. Webb 917a9fd4d5 c_locale.h: Change ::malloc() to new char[].
2004-01-29  Stephen M. Webb  <stephen.webb@bregmasoft.com>

	* config/local/generic/c_locale.h: Change ::malloc() to new char[].
  	* config/local/gnu/c_locale.h: Change ::malloc() to new char[].
  	* include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
	std::get_temporary_buffer() instead of duplicating its code.
	Update to C++STYLE conventions.
  	* include/std/std_memory.h (get_temporary_buffer): Use ::operator
	new() instead of std::malloc().
	(return_temporary_buffer): Use ::operator delete() instead of
	std::free().

From-SVN: r76922
2004-01-30 03:43:00 +00:00
Benjamin Kosnik 6efc84f476 allocator.h: Temporary switch to new_allocator as the default to unjam bootstraps.
2004-01-29  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h: Temporary switch to new_allocator as
	the default to unjam bootstraps.

From-SVN: r76894
2004-01-29 20:42:42 +00:00
Benjamin Kosnik ba9d552e03 Makefile.am (bits_headers): Remove allocator_traits.h.
2004-01-28  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (bits_headers): Remove allocator_traits.h.
	* include/Makefile.in: Regenerate.
	* include/bits/allocator_traits.h: Remove.
	* include/bits/allocator.h: Remove allocator_traits.h include, and
	relevant comments.
	(allocator): Empty base class, inherit from the underlying allocator.
	* src/allocator-inst.cc: Move __pool_alloc instantiation to...
	* src/allocator.cc: ...here. New. For the underlying allocators.
	Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
	* config/linker-map.gnu: Remove __pool_alloc bits.
	* src/Makefile.am (sources): Add allocator.cc.
	* src/Makefile.in: Regenerate.
	* testsuite/20_util/allocator/1.cc: Split second test into...
	* testsuite/20_util/allocator/8230.cc: ...this.
	* include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
	typedef to use std::allocatore. Format.
	* include/ext/pool_allocator.h: Remove allocator_traits.h include,
	_Alloc_traits.
	* include/ext/mt_allocator.h (__gnu_cxx): Qualify
	__throw_bad_alloc calls. Don't include <memory>.
	* include/ext/malloc_allocator.h: Remove <memory> include.
	* include/ext/new_allocator.h (new_allocator): Same.
	* include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
	declaration. Switch __alloc to _Alloc.
	* include/ext/hashtable.h: Remove __alloc.
	* include/backward/alloc.h: Only inject allocator, not
	implementation details.

	* include/ext/mt_allocator.h: Replace free with delete.

From-SVN: r76821
2004-01-29 00:18:40 +00:00
Benjamin Kosnik ff4cf05b3d globals_io.cc: Change to __gnu_internal namespace.
2004-01-28  Benjamin Kosnik  <bkoz@redhat.com>

	* src/globals_io.cc: Change to __gnu_internal namespace.
	* src/globals_locale.cc: Same.
	* src/locale_init.cc: Same.
	* src/ios_init.cc: Same.

From-SVN: r76810
2004-01-28 21:20:42 +00:00
Stefan Olsson f15f99a14e mt_allocator.h: Replaced all malloc() calls with operator new().
2004-01-28  Stefan Olsson  <stefan@snon.net>

 	* include/ext/mt_allocator.h: Replaced all malloc() calls with
	operator new(). Added support for the env variable
	GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
	one in allocate() as well). Fix typos.

From-SVN: r76795
2004-01-28 17:50:34 +00:00
Paolo Carlini 234e0d3121 basic_string.h (_S_create(size_t, const _Alloc&): Change signature to take two size_type arguments.
2004-01-28  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_S_create(size_t,
	const _Alloc&): Change signature to take two size_type
	arguments.
	* include/bits/basic_string.tcc (_S_construct(_InIterator,
	_InIterator, const _Alloc&, input_iterator_tag)): Update
	call, tweak a bit.
	(_S_construct(_InIterator, _InIterator, const _Alloc&,
	forward_iterator_tag)): Likewise.
	(_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
	(_M_mutate(size_type, size_type, size_type)): Don't
	implement the exponential growth policy, demand it to
	_S_create, update call and simplify.
	(_M_clone(const _Alloc&, size_type)): Likewise.
	(_S_create(size_type, size_type, const _Alloc&)): Implement
	the growth policy, simplify otherwise.

	* include/bits/basic_string.h (_Rep::operator[]): Tweak
	signature to take a size_type, consistently with the other
	members.

From-SVN: r76786
2004-01-28 10:37:32 +00:00
Benjamin Kosnik 62b21ea0fc 11584.cc: Correct new and delete declarations, add include and test variable.
2004-01-27  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_base/storage/11584.cc: Correct new and
	delete declarations, add include and test variable.

From-SVN: r76766
2004-01-27 23:41:16 +00:00
Jerry Quinn 0b5634201a codecvt.h, [...]: Document.
2003-01-26  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/codecvt.h, include/bits/locale_facets.h,
	include/bits/postypes.h, include/bits/stl_bvector.h,
	include/bits/stl_multiset.h, include/bits/stl_set.h,
	include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
	include/std/std_complex.h:  Document.

From-SVN: r76749
2004-01-27 21:07:30 +00:00
Jerry Quinn 2a837cf803 re PR libstdc++/11584 (ios::iword() fails to zero-initialize storage on failure)
2004-01-27  Jerry Quinn  <jlquinn@optonline.net>

	PR libstdc++/11584
	* include/bits/ios_base.h (ios_base::_M_grow_words):  Add
        iword/pword selector.
	(ios_base::iword, ios_base::pword):  Use it.
	* src/ios.cc (ios_base::_M_grow_words):  Clear _M_word_zero
        iword or pword member on alloc failure.
	* testsuite/27_io/ios_base/storage/11584.cc:  New test.

From-SVN: r76725
2004-01-27 15:45:43 +00:00
Ulrich Weigand 6e198ee05d configure.host: Add support for *-tpf.
* configure.host: Add support for *-tpf.
	* crossconfig.m4: Likewise.
	* configure: Regenerate.
	* config/os/tpf: New directory.
	* config/os/tpf/os_defines.h: New file.
	* config/os/tpf/ctype_base.h: Likewise.
	* config/os/tpf/ctype_inline.h: Likewise.
	* config/os/tpf/ctype_noninline.h: Likewise.

Co-Authored-By: PJ Darcy <darcypj@us.ibm.com>

From-SVN: r76724
2004-01-27 15:36:22 +00:00
Paolo Carlini 51b6facb1a re PR libstdc++/13884 (Protect sstream.tcc from extern template use)
2004-01-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13884
	* include/bits/sstream.tcc: Guard use of extern template.

From-SVN: r76698
2004-01-27 12:37:37 +00:00
Paolo Carlini a3af79eab6 basic_string.tcc (basic_string(const basic_string&, size_type, size_type), [...]): Avoid unnecessarily constructing iterators.
2004-01-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc
	(basic_string(const basic_string&, size_type, size_type),
	basic_string(const basic_string&, size_type, size_type,
	const _Alloc&)): Avoid unnecessarily constructing iterators.

From-SVN: r76696
2004-01-27 10:46:36 +00:00
Paolo Carlini ba9119ec89 c_locale.cc: Fix throw messages to use the __N marker.
2004-01-26  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc: Fix throw messages
	to use the __N marker.
	* config/locale/gnu/c_locale.cc: Likewise.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
	Likewise.
	* docs/html/17_intro/C++STYLE: Likewise.
	* include/bits/basic_ios.tcc: Likewise.
	* include/bits/fstream.tcc: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* include/std/std_bitset.h: Likewise.
	* src/ios.cc: Likewise.
	* src/locale.cc: Likewise.
	* src/localename.cc: Likewise.

From-SVN: r76684
2004-01-27 00:49:03 +00:00
Paolo Carlini 0e50667c21 basic_string.h (_M_replace_aux): Use the __N marker in throw message.
2004-01-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_replace_aux): Use the
	__N marker in throw message.
	* include/bits/basic_string.tcc (assign(const _CharT*,
	size_type), insert(size_type, const _CharT*, size_type),
	replace(size_type, size_type, const _CharT*, size_type),
	reserve, _Rep::_S_create, resize, _M_replace_dispatch):
	Likewise.

	* include/bits/basic_string.h, include/bits/basic_string.tcc:
	Fold overlong lines, minor formatting changes.

From-SVN: r76664
2004-01-26 20:23:20 +00:00
Paolo Carlini 4d39d873e0 basic_string.h (replace(iterator, iterator, const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
2004-01-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (replace(iterator, iterator,
	const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
	(replace(iterator, iterator, const _CharT*)): Ditto.
	(replace(iterator, iterator, const _CharT*, size_type)):
	Add missing _GLIBCXX_DEBUG_PEDASSERT.

From-SVN: r76630
2004-01-26 12:58:53 +00:00
Paolo Carlini 2cb612d1b0 basic_string.tcc (replace(size_type, size_type, const _CharT*, size_type)): Implement optimized in-place algorithm for non-overlapping ranges.
2004-01-26  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (replace(size_type,
	size_type, const _CharT*, size_type)): Implement optimized
	in-place algorithm for non-overlapping ranges.
	* testsuite/21_strings/basic_string/replace/char/6.cc: New.
	* testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.

	* include/bits/basic_string.tcc (insert(size_type,
	const _CharT*, size_type)): Tweak slightly.

From-SVN: r76625
2004-01-26 09:07:18 +00:00
Andreas Schwab f942e78de9 monetary_members.cc: Restore locale before rethrowing exception.
* config/locale/gnu/monetary_members.cc: Restore locale before
rethrowing exception.

From-SVN: r76595
2004-01-25 23:31:43 +00:00
Paolo Carlini 91eab3788d basic_string.h (_M_replace_aux, [...]): Define inline here.
2004-01-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
	Define inline here.
	* include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
	Move inline.

	* include/bits/basic_string.tcc: Very minor tweaks.

From-SVN: r76592
2004-01-25 22:43:07 +00:00
Paolo Carlini 9c519c934c string_append.cc: Increase number of iterations.
2004-01-25  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/string_append.cc: Increase number
	of iterations.

From-SVN: r76551
2004-01-25 11:07:50 +00:00
Paolo Carlini 30f315cd16 basic_string.h (erase(size_type, size_type), [...]): Call _M_replace_safe instead, thus avoiding redundant check for length_error.
2004-01-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (erase(size_type, size_type),
	erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
	instead, thus avoiding redundant check for length_error.

	* include/bits/basic_string.h: Tweak some comments.

From-SVN: r76550
2004-01-25 10:26:46 +00:00
Paolo Carlini bb9909b0fb basic_string.tcc (operator+(const _CharT*, const basic_string&)): No need to go through the append taking two iterators.
2004-01-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (operator+(const _CharT*,
	const basic_string&)): No need to go through the append
	taking two iterators.

From-SVN: r76517
2004-01-24 18:54:23 +00:00
Paolo Carlini 04cc8aef67 basic_string.tcc (rfind(_CharT, size_type)): Revert last change to use std::min: machine language is worse.
2004-01-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (rfind(_CharT, size_type)):
	Revert last change to use std::min: machine language is worse.
	(find_last_of(const _CharT*, size_type, size_type)): Ditto.
	(find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
	(find_last_not_of(_CharT, size_type)): Ditto.

	* include/bits/basic_string.tcc (insert(size_type, const _CharT*,
	size_type)): Discard the value returned by _M_check.
	(replace(size_type, size_type, const _CharT*, size_type)): Ditto.
	(append(const basic_string&, size_type, size_type)): Ditto.
	(copy(_CharT*, size_type, size_type)): Ditto.
	(compare(size_type, size_type, const basic_string&)): Ditto.
	(compare(size_type, size_type, const basic_string&,
	size_type, size_type)): Ditto.
	(compare(size_type, size_type, const _CharT*)): Ditto.
	(compare(size_type, size_type, const _CharT*, size_type)): Ditto.

From-SVN: r76514
2004-01-24 16:52:04 +00:00
Paolo Carlini 8865bf80ee basic_string.h (insert(size_type, const basic_string&, size_type, size_type)): Define inline here.
2004-01-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (insert(size_type,
	const basic_string&, size_type, size_type)): Define inline here.
	* include/bits/basic_string.tcc (insert(size_type,
	const basic_string&, size_type, size_type)): Move inline.

From-SVN: r76509
2004-01-24 12:32:54 +00:00
Paolo Carlini fefe561e80 basic_string.h (assign(const basic_string&, size_type, size_type)): Define inline here.
2004-01-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (assign(const basic_string&,
	size_type, size_type)): Define inline here.
	(replace(size_type, size_type, const basic_string&,
	size_type, size_type)): Ditto.
	(_M_replace_dispatch(iterator, iterator, _InputIterator,
	_InputIterator, __false_type)): Only declare.
	(_M_replace(iterator, iterator, _InputIterator,
	_InputIterator)): Remove.
	* include/bits/basic_string.tcc (assign(const basic_string&,
	size_type, size_type)): Move inline.
	(replace(size_type, size_type, const basic_string&,
	size_type, size_type)): Ditto.
	(_M_replace_dispatch(iterator, iterator, _InputIterator,
	_InputIterator, __false_type)): Define, now does also what
	_M_replace did before.
	* src/string-inst.cc (_M_replace): Don't instantiate.

	* include/bits/basic_string.tcc (find(const _CharT*,
	size_type, size_type)): Tidy.
	(rfind(_CharT, size_type)): Ditto.
	(find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
	(find_first_not_of(_CharT, size_type)): Ditto.
	(find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
	(find_last_not_of(_CharT, size_type)): Ditto.

From-SVN: r76508
2004-01-24 11:34:06 +00:00
Paolo Carlini 72afd981f8 re PR libstdc++/13838 (std::bitset<>::operator |= error with -D_GLIBCXX_DEBUG)
2004-01-23  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13838
	* include/debug/bitset (operator|=): Fix typo.
	* testsuite/23_containers/bitset/operations/13838.cc: New.

From-SVN: r76479
2004-01-24 01:25:37 +00:00
Paolo Carlini 251804e635 basic_string.tcc (insert(size_type, const _CharT*, size_type __n)): Fix length_error check.
2004-01-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (insert(size_type,
	const _CharT*, size_type __n)): Fix length_error check.
	(replace(size_type, size_type, const _CharT*, size_type):
	Ditto; call _M_replace_safe.
	(_M_replace_aux(size_type, size_type, size_type, _CharT):
	Fix length_error check.
	(_M_replace(iterator, iterator, _InputIterator,
	_InputIterator)): Ditto, tweak.
	(_M_replace_safe(size_type, size_type, const _CharT*,
	size_type)): Remove length_error check.

	* include/bits/basic_string.tcc (append(const basic_string&),
	append(const basic_string&, size_type, size_type)): Tweak
	comment.

	* include/bits/basic_string.tcc (copy(_CharT*, size_type,
	size_type)): If __n == 0 don't call traits::copy.

From-SVN: r76476
2004-01-24 00:27:19 +00:00
Stefan Olsson 3cfb44c200 mt_allocator.h: Reduce lock contention.
2004-01-23  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: Reduce lock contention.

From-SVN: r76474
2004-01-24 00:21:02 +00:00
Paolo Carlini 22352844c9 re PR libstdc++/13831 (Unused variable in basic_filebuf::underflow)
2004-01-23  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13831
	* include/bits/fstream.tcc (underflow): Remove unused
	variable.
	* include/bits/streambuf_iterator.h (equal): Ditto.
	* include/bits/locale_facets.h (_M_convert_from_char):
	Ditto.

From-SVN: r76433
2004-01-23 16:51:24 +00:00
Kaveh R. Ghazi 129057c1ee re PR c/13814 (rejects different prototypes than builtin function)
PR c/13814
	* config/linker-map.gnu (nan): Delete.
	* libmath/mathconf.h (NAN, nan): Delete.
	* linkage.m4 (nan): Don't check for it.
	* libmath/nan.c: Delete file.

	* config.h.in, configure: Regenerate.

From-SVN: r76431
2004-01-23 16:47:06 +00:00
Paolo Carlini 0e707673d2 basic_string.h (push_back(_CharT)): Call _M_replace_aux.
2004-01-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (push_back(_CharT)):
	Call _M_replace_aux.
	(insert(size_type, const basic_string&)): Trivial tweak.
	(insert(size_type, size_type, _CharT)): Call _M_replace_aux.
	(insert(iterator, _CharT)): Ditto.
	(erase(size_type, size_type)): Ditto.
	(erase(iterator)): Ditto.
	(erase(iterator, iterator)): Ditto.
	(replace(size_type, size_type, size_type, _CharT)): Ditto.

From-SVN: r76420
2004-01-23 13:57:19 +00:00
Loren J. Rittle 402b0954be allocator_map_thread.cc: New test.
libstdc++/13823
	* testsuite/performance/allocator_map_thread.cc: New test.

From-SVN: r76398
2004-01-23 06:54:06 +00:00
Paolo Carlini ba46e66a8b locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string constructor for char arrays...
2004-01-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc
	(money_put::do_put(..., long double)): Use the basic_string
	constructor for char arrays, not that for C-strings, to pass
	__digits to do_put(..., const string_type&): __ws isn't
	null-terminated.

From-SVN: r76355
2004-01-22 14:25:37 +00:00
Paolo Carlini 7bb9b33b3b basic_string.h (_M_replace_safe): Change signatures to take size_types and const _CharT*.
2004-01-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_replace_safe): Change
	signatures to take size_types and const _CharT*.
	(_M_replace_aux): Likewise, takes size_types instead of
	iterators.
	(append(size_type, _CharT)): Update call.
	(assign(size_type, _CharT)): Ditto.
	(replace(iterator, iterator, size_type, _CharT)): Ditto.
	(_M_replace_dispatch(iterator, iterator, _Integer,
	_Integer, __true_type)): Ditto.
	* include/bits/basic_string.tcc (assign(const _CharT*,
	size_type)): Ditto.
	(insert(size_type, const _CharT*, size_type)): Ditto.
	(replace(size_type, size_type, const _CharT*,
	size_type)): Ditto.
	(_M_replace(iterator, iterator, _InputIterator,
	_InputIterator)): Ditto.
	(append(const basic_string&)): Ditto.
	(append(const basic_string&, size_type, size_type): Ditto.
	(append(const _CharT*, size_type): Ditto.
	(_M_replace_safe, _M_replace_safe): Change definitions
	accordingly, simplify.
	* string-inst.cc (_M_replace_safe): Don't instantiate.

From-SVN: r76353
2004-01-22 12:46:28 +00:00
Paolo Carlini 3e7782b2f8 basic_string.tcc (append(const basic_string&)): Revert previous change.
2004-01-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (append(const basic_string&)):
	Revert previous change.
	(append(const basic_string&, size_type, size_type)): Revert
	previous change, use _M_check and _M_limit.

From-SVN: r76282
2004-01-21 15:43:45 +00:00
Paolo Carlini e03a6fb7b6 basic_string.h (_M_check): Change to return a checked __pos and take an additional const char* argument.
2004-01-21  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (_M_check): Change to return
	a checked __pos and take an additional const char* argument.
	(_M_fold): Rename to _M_limit, change to return a size_type,
	corresponding to the __off limited to the actual length.
	(insert(size_type, size_type, _CharT)): Update call, call
	replace.
	(insert(iterator, _CharT)): Call replace(iterator, iterator,
	size_type, _CharT) instead.
	(erase(size_type, size_type)): Update calls.
	(replace(size_type, size_type, size_type, _CharT)): Ditto.
	(substr(size_type, size_type)): Use _M_check.
	* include/bits/basic_string.tcc (basic_string(const basic_string&,
	size_type, size_type)): Update calls.
	(basic_string(const basic_string&, size_type, size_type,
	const _Alloc&)): Ditto.
	(assign(const basic_string&, size_type, size_type)): Use the
	new _M_check and _M_limit.
	(insert(size_type, const basic_string&, size_type, size_type):
	Ditto.
	(insert(size_type, const _CharT*, size_type)): Ditto.
	(replace(size_type, size_type, const _CharT*, size_type): Ditto.
	(replace(size_type, size_type, const basic_string&,
	size_type, size_type)): Ditto.
	(append(const basic_string&)): Ditto.
	(append(const basic_string&, size_type, size_type)): Ditto.
	(copy(_CharT*, size_type, size_type)): Ditto.
	(compare(size_type, size_type, const basic_string&)): Ditto.
	(compare(size_type, size_type, const basic_string&,size_type,
	size_type)): Ditto.
	(compare(size_type, size_type, const _CharT*)): Ditto.
	(compare(size_type, size_type, const _CharT*, size_type)): Ditto.

From-SVN: r76274
2004-01-21 11:29:51 +00:00
Stefan Olsson cec73eb50c mt_allocator.h: If a thread...
2004-01-19  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: If a thread, when it dies, still has
	memory on it's freelist this memory is not returned to global
	list. Simplification of deallocate so that memory is always
	returned to the calling thread id's freelist instead of to
	global. Fix typos. Add volatile where appropriate.

From-SVN: r76200
2004-01-20 06:35:21 +00:00
Loren J. Rittle 87d11ccc82 10063-2.cc: Treat unbuffered.
* testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
	* testsuite/ext/stdio_filebuf/char/10063-3.cc: New test.  Like -2 but
	use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.

From-SVN: r76191
2004-01-20 01:30:03 +00:00
Paolo Carlini f18be892cb debug.cc: Make sure all the names are prefixed with double (or single) underscore.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* src/debug.cc: Make sure all the names are prefixed with
	double (or single) underscore.

From-SVN: r76163
2004-01-19 18:10:55 +00:00
Paolo Carlini 33d4e9b26c debug.cc: Trivial formatting change.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* src/debug.cc: Trivial formatting change.

From-SVN: r76147
2004-01-19 12:11:50 +00:00
Paolo Carlini 954b12d2dc basic_string.tcc (_S_construct(size_type, _CharT, const _Alloc&)): Remove redundant try/catch.
2004-01-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (_S_construct(size_type,
	_CharT, const _Alloc&)): Remove redundant try/catch.
	(_M_mutate(size_type, size_type, size_type)): Ditto.
	(_M_clone(const _Alloc&, size_type)): Ditto.

From-SVN: r76141
2004-01-19 08:53:32 +00:00
Paolo Carlini bbad4221ec 2004-01-18 Paolo Carlini <pcarlini@suse.de>
* ChangeLog rotation.

From-SVN: r76093
2004-01-18 11:18:29 +00:00
Paolo Carlini acbab5bf1c basic_string.h (c_str()): Simplify, due to 21.3.4 the internal representation is always kept null-terminated.
2004-01-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (c_str()): Simplify, due to
	21.3.4 the internal representation is always kept null-terminated.
	* include/bits/basic_string.tcc (_M_clone): Null-terminate.
	* testsuite/21_strings/basic_string/element_access/char/4.cc: New.
	* testsuite/21_strings/basic_string/element_access/wchar_t/4.cc: Ditto.

From-SVN: r76092
2004-01-18 10:51:13 +00:00
Paolo Carlini 9c96a6896b basic_string.h (append(size_type, _CharT)): Moved inline...
2004-01-18  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.h (append(size_type, _CharT)):
	Moved inline, just call _M_replace_aux, no source iterators at
	risk of being clobbered.
	(assign(size_type, _CharT)): Call directly _M_replace_aux.
	(_M_replace(iterator, iterator, _InputIterator, _InputIterator,
	input_iterator_tag)): Remove fifth unused argument.
	(_M_replace_dispatch(iterator, iterator, _InputIterator,
	_InputIterator, __false_type)): Update call.
	* include/bits/basic_string.tcc (replace(size_type, size_type,
	const _CharT*, size_type)): Update call.
	(_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
	throw string literal.
	(_M_replace_safe(iterator, iterator, _ForwardIterator,
	_ForwardIterator)): Likewise.
	(_M_replace(iterator, iterator, _InputIterator, _InputIterator,
	input_iterator_tag)): Remove fifth unused argument.
	(append(size_type __n, _CharT __c)): Move inline.
	* src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
	const C*, const C*, input_iterator_tag)): Remove fifth unused
	argument.

From-SVN: r76091
2004-01-18 09:54:46 +00:00
Benjamin Kosnik d517f626e1 13189.cc: Fix guards.
2004-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.

From-SVN: r76017
2004-01-17 00:51:35 +00:00
Danny Smith 701b701b54 testsuite_hooks.cc (try_mkfifo): Avoid calling mkfifo for mingw32.
2004-01-16  Danny Smith  <dannysmith@users.sourceforge.net>

	* testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
	mkfifo for mingw32.

From-SVN: r75963
2004-01-16 08:43:45 +00:00
Stefan Olsson 2913770f6f mt_allocator.h: Reuse thread id's as soon as possible by changing the behaviour of...
2004-01-15  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: Reuse thread id's as soon as
	possible by changing the behaviour of thread_freelist to do
	push_front when threads die instead of push_back.

From-SVN: r75939
2004-01-15 19:18:35 +00:00
Paolo Carlini 47f62b27c8 locale_facets.h (struct __numpunct_cache): Add member _M_grouping_size, caching the length of _M_grouping.
2004-01-14  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (struct __numpunct_cache):
	Add member _M_grouping_size, caching the length of _M_grouping.
	(__numpunct_cache<>::_M_cache): Assign the latter.
	(__verify_grouping): Move declaration...
	* include/bits/locale_facets.tcc (__verify_grouping):
	... here, change signature to take a const char* and a size_t
	for the grouping; not a template anymore.
	(__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
	Likewise change signature and tweak consistently.
	(num_get::_M_extract_float, num_get::_M_extract_int,
	num_put::_M_insert_int, num_put::_M_insert_float,
	money_get::do_get(string_type&), money_get::do_put(string_type)):
	Update callers.
	* config/locale/generic/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Assign the new member.
	* config/locale/gnu/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Likewise.
	* src/locale-inst.cc (__add_grouping): Tweak signature.
	(__verify_grouping): Don't instantiate, not a template anymore.

	* include/bits/locale_facets.h: Rename _M_truename_len ->
	_M_truename_size, _M_falsename_len -> _M_falsename_size.
	* include/bits/locale_facets.tcc: Likewise.
	* config/locale/generic/numeric_members.cc: Likewise.
	* config/locale/gnu/numeric_members.cc: Likewise.

From-SVN: r75876
2004-01-14 19:14:39 +00:00
Stefan Olsson 41f2472503 mt_allocator.h: Fixups.
2004-01-14  Stefan Olsson  <stefan@snon.net>

	* include/ext/mt_allocator.h: Fixups.
	* testsuite/performance/allocator.cc: Enable __mt_alloc tests.
	* testsuite/performance/allocator_thread.cc: Same.

From-SVN: r75875
2004-01-14 18:54:18 +00:00
Benjamin Kosnik 070ce57b95 ifstream_extract_float.cc: Add higher precision tests.
2
2004-01-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/ifstream_extract_float.cc: Add higher
	precision tests.
	* testsuite/performance/ofstream_insert_float.cc: Same.

From-SVN: r75841
2004-01-14 04:11:57 +00:00
Paolo Carlini c951359074 locale-misc-inst.cc (__convert_from_v(long), [...]): Remove, unused.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* src/locale-misc-inst.cc (__convert_from_v(long),
	__convert_from_v(unsigned long), __convert_from_v(long long),
	__convert_from_v(unsigned long long)): Remove, unused.

From-SVN: r75822
2004-01-13 23:25:55 +00:00
Benjamin Kosnik 60af005f4b ifstream_extract_float.cc: New.
2004-01-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/ifstream_extract_float.cc: New.
	* testsuite/performance/ofstream_insert_float.cc: Float generation
	matches above.

	* 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
	* 20_util/auto_ptr/1.cc: ...this.
	* 20_util/auto_ptr/2.cc: Same.
	* 20_util/auto_ptr/3.cc: Same.
	* 20_util/auto_ptr/3946.cc: Same.
	* 20_util/auto_ptr/4.cc: Same.
	* 20_util/auto_ptr/5.cc: Same.
	* 20_util/auto_ptr/6.cc: Same.
	* 20_util/auto_ptr/7.cc: Same.
	* 20_util/auto_ptr/assign_neg.cc
	* 20_util/pairs.cc: Break into...
	* 20_util/pair/1.cc: ...this.
	* 20_util/pair/2.cc: Same.
	* 20_util/pair/3.cc: Same.
	* 20_util/pair/4.cc: Same.

From-SVN: r75811
2004-01-13 18:57:45 +00:00
Paolo Carlini d8ef7deccb locale_facets.tcc (num_get::do_get(void*&)): Set correctly just basefield, the only group that matters.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::do_get(void*&)):
	Set correctly just basefield, the only group that matters.

From-SVN: r75810
2004-01-13 18:53:57 +00:00
Paolo Carlini 5640461d2f rope (_Rope_rep_alloc_base): Eliminate.
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/rope (_Rope_rep_alloc_base): Eliminate.
	(_Rope_rep_base): Inherit directly from the rope allocator;
	use rebinding instead of _Alloc_traits; pick up data member
	from _Rope_rep_alloc_base.
	(_Rope_alloc_base): Eliminate.
	(_Rope_base): Inherit directly from the rope allocator; use
	rebinding instead of _Alloc_traits; pick up data member from
	_Rope_alloc_base.
	(rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
	rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.

From-SVN: r75800
2004-01-13 11:46:50 +00:00
Paolo Carlini 95c9624ff5 re PR libstdc++/13650 (string::compare should not (always) use traits_type::length())
2004-01-13  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13650
	* include/bits/basic_string.tcc (compare(size_type, size_type,
	const _CharT*, size_type)): Implement correctly the resolution
	of DR 5: basically, s is a char array, -not- a C string.
	* include/bits/basic_string.h: Tweak some comments.
	* testsuite/21_strings/basic_string/compare/char/13650.cc: New.
	* testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.

From-SVN: r75798
2004-01-13 11:12:38 +00:00
Andreas Tobler c91de77a9d libstdc++.exp: Set LD_LIBRARY_PATH_32 for Solaris.
2004-01-10  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
	Solaris.

From-SVN: r75759
2004-01-12 21:47:44 +01:00
Paolo Carlini 300b3317f3 13582-2.cc: Use try_mkfifo.
2004-01-12  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
	Use try_mkfifo.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
	Likewise.

From-SVN: r75738
2004-01-12 17:25:25 +00:00
Paolo Carlini dc6798f865 locale_facets.h (struct __numpunct_cache): Add members _M_truename_len and _M_falsename_len...
2004-01-12  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (struct __numpunct_cache):
	Add members _M_truename_len and _M_falsename_len, caching
	the lengths of _M_truename and _M_falsename.
	(__numpunct_cache<>::_M_cache): Assign the latter.
	* include/bits/locale_facets.tcc (num_get::do_get(bool&),
	num_put::do_put(bool)): Use the new members, thus avoiding
	computing string lengths again and again.
	* config/locale/generic/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Assign the new members.
	* config/locale/gnu/numeric_members.cc
	(numpunct<>::_M_initialize_numpunct): Likewise.

From-SVN: r75735
2004-01-12 17:02:08 +00:00
Mark Mitchell ea1ea21af5 testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
* testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
	* testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
	it.
	* testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
	and remove Cygwin XFAIL.
	* testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
	* testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
	* testsuite/27_io/objects/char/7.cc: Likewise.
	* testsuite/27_io/objects/char/9661-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/7.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.

From-SVN: r75706
2004-01-12 08:11:08 +00:00
Paolo Carlini b74a685105 2004-01-11 Paolo Carlini <pcarlini@suse.de>
* Fix a date in the ChangeLog.

From-SVN: r75682
2004-01-11 17:43:11 +00:00
Gabriel Dos Reis 3b3bfc0eeb std_complex.h (std::complex<>::real): Return a reference.
* include/std/std_complex.h (std::complex<>::real): Return a
        reference. Add non-const overload.
        (std::complex<>::real): Likewise.
        (std::real): Likewise.
        (std::imag): Likewise.
        (std::operator+): Tidy.
        (std::operator-): Likewise.
        (std::operator*): Likewise.
        (std::operator/): Likewise.
        (std::operator>>): Likewise.

From-SVN: r75680
2004-01-11 16:15:42 +00:00
Paolo Carlini 09625c1681 re PR libstdc++/13582 (basic_filebuf::imbue drops characters)
2004-01-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13582
	* include/bits/fstream.tcc (imbue): Exploit the external
	buffer to imbue 'on the fly' a new locale and convert its
	remainder with the new codecvt facet.
	(underflow): Tweak slightly to deal with this special case.
	* testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
	* testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
	* testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.

From-SVN: r75677
2004-01-11 15:17:02 +00:00
Paolo Carlini a8d6534992 lwg-active.html, [...]: Import Revision 28.
2004-01-10  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
	Import Revision 28.

From-SVN: r75648
2004-01-10 20:09:26 +00:00
Paolo Carlini b656faa883 re PR libstdc++/13630 (Wrong type for locale::category)
2004-01-10  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13630
	* include/bits/locale_classes.h (class locale): Fix category typedef.
	* testsuite/22_locale/locale/13630.cc: Add.

From-SVN: r75635
2004-01-10 10:15:35 +00:00
Giovanni Bajo f88e471576 locale_facets.h: Make a name really dependent.
* include/bits/locale_facets.h: Make a name really dependent. This
	will be needed when Core Issue 224 is implemented.

From-SVN: r75617
2004-01-10 01:10:23 +00:00
Paolo Carlini 64cb2c4aed allocator.cc: Demangle typeid(obj).name().
2004-01-09  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/allocator.cc: Demangle typeid(obj).name().
	* testsuite/performance/allocator_thread.cc: Likewise.

From-SVN: r75571
2004-01-09 10:09:31 +00:00
Benjamin Kosnik 158960ba7e crossconfig.m4: Add LFS, io bits to linux cross config.
2004-01-07  Benjamin Kosnik  <bkoz@redhat.com>

	* crossconfig.m4: Add LFS, io bits to linux cross config.
	* acconfig.h: Remove obsolete bits, reorder.
	* config.h.in: Regenerate.
	* aclocal.m4: Same.
	* configure: Same.

From-SVN: r75520
2004-01-07 22:17:01 +00:00
Benjamin Kosnik e135a038d3 [multiple changes]
2004-01-07  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_list.h:
	* include/bits/list.tc:
	* src/list.cc:
        Performance enhancements for destructor, push_front(),
        push_back(), pop_front(), pop_back(), sort()
        Eliminated static_casts where possible.
        Moved code out of header files into new src/list.cc
        implementation file for library where possible.
        Remove inheritance from iterator class and create separate
        classes for non-constant and constant iterators.
	* include/bits/stl_tree.h (_Rb_tree class):
	* src/tree.cc:
        Only erase contents in destructor.
        Eliminate unnecessary initialization in assignment operator.
        Optimize for the nominal case by not checking whether
        container is empty in clear().
        Re-order test in _M_insert() to improve performance.
        Move initialization of new node's left & right pointers to
        src/tree.cc to where new node's colour is initialized
        and to reduce the amount of inline code.
        Use  _M_leftmost() and _M_end() to improve readability where
        appropriate.
        Create separate classes for non-constant and constant
        iterators to clarify code, avoid extra template parameters and
        casting away constness.

2004-01-07  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add list.cc, tree.cc.
	* src/stl_tree.cc: Move to...
	* src/tree.cc: ...here.
	* src/list.cc: Add.
	* config/linker-map.gnu: Tweaks.
	* testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
	* testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.

	* bits/stl_vector.h: Column wrap comments.

From-SVN: r75515
2004-01-07 20:55:06 +00:00
Loren J. Rittle 677e7ddcee (re-open) PR libstdc++/12658
(re-open) PR libstdc++/12658
	* src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
	(locale::global): Likewise.

From-SVN: r75509
2004-01-07 17:40:45 +00:00
Paolo Carlini d8f5bd5016 9318-in.cc: Remove redundant #include.
2004-01-07  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
	Remove redundant #include.
	* testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
	re-enable normal testing.
	* testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
	#include.
	* testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
	More properly, #include <locale>.
	* testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
	Remove redundant #include.
	* testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
	redundant DejaGnu directive.
	* testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
	redundant #include.

From-SVN: r75508
2004-01-07 17:13:51 +00:00
Benjamin Kosnik b61f9bf039 check_performance: Use -pthread.
2004-01-06  Benjamin Kosnik  <bkoz@redhat.com>
            Stefan Olsson  <stefan@snon.net>

	* scripts/check_performance: Use -pthread.
	* testsuite/performance/allocator.cc: Tweaks, add list.
	* testsuite/performance/allocator_thread.cc: New.

Co-Authored-By: Stefan Olsson <stefan@snon.net>

From-SVN: r75499
2004-01-07 05:59:19 +00:00
Jerry Quinn 9a01c9b061 locale_facets.h: Document public classes and functions.
2003-01-06  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h: Document public classes and
	functions.
	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Add comment.

From-SVN: r75498
2004-01-07 05:22:37 +00:00
Paolo Carlini b80115c4b7 1.cc: Remove redundant #includes.
2004-01-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_other/char/1.cc:
	Remove redundant #includes.
	* testsuite/27_io/basic_istream/extractors_other/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_other/char/3.cc:
	Likewise.
	* testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
	* testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
	* testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
	* testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
	Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/readsome/char/8258.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.

From-SVN: r75469
2004-01-06 12:20:42 +00:00
Paolo Carlini 22ed0590a4 2004-01-04 Paolo Carlini <pcarlini@suse.de>
* Fix year in the Changelog entry of last commit.

From-SVN: r75399
2004-01-04 23:26:31 +00:00
Paolo Carlini 223b5084a6 01.cc: Remove redundant #includes.
2003-01-04  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
	Remove redundant #includes.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
	Likewise.

From-SVN: r75398
2004-01-04 23:19:00 +00:00
Mark Mitchell 4f8163b19c re PR c++/12226 (g++ fails to enforce accessibility requirement for copy constructor)
PR c++/12226
	* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
	(reference_binding): Set it when appropriate.
	(build_temp): New function, split out from ...
	(convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
	(initialize_reference): Likewise.

	PR c++/12226
	* g++.dg/init/copy7.c: New test.

	PR c++/12226
	* testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
	constructor.
	* testsuite/27_io/basic_fstream/4.cc: Likewise.
	* testsuite/27_io/basic_ifstream/4.cc: Likewise.
	* testsuite/27_io/basic_ios/4.cc: Likewise.
	* testsuite/27_io/basic_iostream/4.cc: Likewise.
	* testsuite/27_io/basic_istream/4.cc: Likewise.
	* testsuite/27_io/basic_istingstream/4.cc: Likewise.
	* testsuite/27_io/basic_ofstream/4.cc: Likewise.
	* testsuite/27_io/basic_ostream/4.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/4.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/5.cc: Likewise.
	* testsuite/27_io/basic_stringstream/4.cc: Likewise.

	PR c++/13536
	* parser.c (cp_parser): Add in_type_id_in_expr_p.
	(cp_parser_new): Initialize it.
	(cp_parser_postfix_expression): Set it.
	(cp_parser_sizeof_operand): Likewise.
	(cp_parser_parameteR_declaration): Do not commit early to tenative
	parsers when in_type_id_in_expr_p is set.

	PR c++/13536
	* g++.dg/parse/cast1.C: New test.

From-SVN: r75397
2004-01-04 22:42:22 +00:00
Paolo Carlini 17fa55600a numeric_members.cc (_M_initialize_numpunct): Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in...
2004-01-04  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
	Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
	always use double underscored names.
	* config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
	Likewise.
	* include/bits/locale_facets.h (struct __numpunct_cache):
	Dimension _M_atoms_out and _M_atoms_in one position smaller.
	(__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out
	and _M_atoms_in.

From-SVN: r75393
2004-01-04 18:34:27 +00:00
Paolo Carlini 4f0c9c8a87 locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2...
2003-12-31  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	_first_ look for thousands_sep, then for decimal_point and
	finally for digits.
	(num_get::_M_extract_float): After the decimal_point or
	'e'/'E', decimal_point and thousands_sep just break out the
	parsing loop.
	* testsuite/22_locale/num_get/get/char/11.cc: Add tests.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r75259
2003-12-31 08:28:10 +00:00
Paolo Carlini a27cf81c7a re PR libstdc++/13369 (__verify_grouping (and __add_grouping?) not correct)
2003-12-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13369
	* include/bits/locale_facets.tcc (__verify_grouping):
	Fix to deal properly with __grouping_tmp.size() >
	__grouping.size().
	* testsuite/22_locale/num_get/get/char/13.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/13.cc: Ditto.

From-SVN: r75227
2003-12-30 10:43:54 +00:00
Jerry Quinn a043b1f5c9 locale_facets.h (ctype.narrow,widen): Add cast.
2003-12-29  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h (ctype.narrow,widen): Add cast.

From-SVN: r75222
2003-12-30 03:09:17 +00:00
Paolo Carlini 9d47bc51b8 acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions to CXXFLAGS.
2003-12-29  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions
	to CXXFLAGS.
	* aclocal.m4: Regenerate.
	* configure: Likewise.

From-SVN: r75212
2003-12-29 20:13:22 +00:00
Mark Mitchell 517da0ce8a acconfig.h: Add _GLIBCXX_USE_C99_MATH.
* acconfig.h: Add _GLIBCXX_USE_C99_MATH.
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Define GLIBCXX_USE_C99_MATH.
	* configure.ac: Define HAVE_S_ISREG and HAVE_S_IFREG when
	targeting newlib.
	* aclocal.m4: Regenerated.
	* config.h.in: Likewise.
	* configure: Likewise.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* include/c_std/std_cmath.h (_GLIBCXX_USE_C99): Replace with ...
	(_GLIBCXX_USE_C99_MATH): ... this.

	* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL for
	arm-none-elf.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6476-2.cc: Likewise.
	* testsuite/27_io/objects/char/9.cc: Likewise.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: Likewise.

From-SVN: r75209
2003-12-29 19:26:16 +00:00
Paolo Carlini b8da67fa2f pool_allocator.h (class __pool_alloc): Use operator new and operator delete.
2003-12-28  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/pool_allocator.h (class __pool_alloc): Use
	operator new and operator delete.

From-SVN: r75181
2003-12-28 12:13:15 +00:00
Andrew Pinski be88628621 atomicity.h (__exchange_and_add): Fix output constraint.
* config/cpu/i386/atomicity.h (__exchange_and_add): Fix output
        constraint.

From-SVN: r75017
2003-12-24 20:27:58 -08:00
Andrew Pinski a51c409779 re PR libstdc++/13480 (bits/atomicity.h:56: warning: read-write constraint does not allow a register)
2003-12-24  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libstdc++/13480
        * config/cpu/i486/atomicity.h: Split up read-write memory operand.

From-SVN: r75016
2003-12-24 18:04:06 -08:00
Benjamin Kosnik d38d4e5d18 new_allocator.h (new_allocator): Proper allocator class.
2003-12-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/new_allocator.h (new_allocator): Proper allocator class.
	(__new_alloc): Delete.
	* include/ext/malloc_allocator.h (malloc_allocator): Same.
	(__malloc_alloc): Delete.
 	* include/ext/mt_allocator.h: Same, but weakly.
 	* include/ext/debug_allocator.h: Convert to the new style.
	* include/ext/pool_allocator.h: Use global new and delete directly.
	* include/backward/alloc.h: Don't inject malloc_allocator, or
	debug_allocator.
	* testsuite/ext/allocators.cc: Minimal fixups for usage of new
	classes.  Comment out tests with __pool_alloc for now.
	* testsuite/performance/allocator.cc: Same.

From-SVN: r74965
2003-12-23 07:24:57 +00:00
Matt Austern 34c878297e stl_bvector.h (_Bvector_alloc_base): Eliminate.
* include/bits/stl_bvector.h (_Bvector_alloc_base): Eliminate.
        (_Bvector_base): Inherit directly from word allocator.
        * include/bits/stl_tree.h (_Rb_tree_alloc_base): Eliminate.
        (_Rb_tree_base): Eliminate.
        (_Rb_tree): Inherit directly from node allocator.
        * include/ext/slist (_Alist_alloc_base): Eliminate.
        (_Slist_base): Inherit direcly from node allocator.

From-SVN: r74955
2003-12-23 00:09:26 +00:00
Benjamin Kosnik 941fe801b4 numeric_limits.cc: Add _GLIBCXX_ASSERT to dg-options in testcases that use VERIFY.
2003-12-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/18_support/numeric_limits.cc: Add _GLIBCXX_ASSERT to
	dg-options in testcases that use VERIFY.
	* testsuite/23_containers/vector/invalidation/1.cc: Same.
	* testsuite/23_containers/vector/invalidation/2.cc: Same.
	* testsuite/23_containers/vector/invalidation/3.cc: Same.
	* testsuite/23_containers/vector/invalidation/4.cc: Same.
	* testsuite/23_containers/vector/resize/1.cc: Same.
	* testsuite/26_numerics/complex_value.cc: Same.
	* testsuite/27_io/ios_base/storage/1.cc: Same.
	* testsuite/27_io/ios_base/storage/2.cc: Same.
	* testsuite/27_io/ios_base/storage/3.cc: Same.
	* testsuite/27_io/manipulators/standard/char/2.cc: Same.
	* testsuite/backward/11460.cc: Same.
	* testsuite/backward/strstream_members.cc: Same.

	* include/ext/hash_set (class hash_multiset): Fix typo.

From-SVN: r74951
2003-12-22 21:05:22 +00:00
Benjamin Kosnik 70a8416094 5.cc: Don't use stdc++.h.gch.
2003-12-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/objects/char/5.cc: Don't use stdc++.h.gch.
	* testsuite/27_io/objects/wchar_t/5.cc: Same.
	* docs/html/test.html: Add docs for constructing test files that
	don't use stdc++.h.gch.
	* scripts/testsuite_flags.in (PCHFLAGS): Move to --cxxpchflags.
	* testsuite/libstdc++-dg/normal.exp: Compute DEFAULT_CXXFLAGS
	differently.

	* include/bits/ios_base.h (ios_base::Init::_S_initialized): Remove.
	* src/ios_init.cc: Same.
	* config/linker-map.gnu: Same.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.

From-SVN: r74946
2003-12-22 20:09:23 +00:00
Andrew Pinski 67e053df03 re PR libstdc++/13462 (Non-standard conformed type set::pointer)
2003-12-22  Andrew Pinski  <pinskia@physics.uc.edu>

       PR libstdc++/13462
       * include/bits/stl_multiset.h (__gnu_norm::multiset): Define pointer
       as allocator's pointer, likewise for reference, const_pointer, and
       const_reference.
       * include/bits/stl_set.h (__gnu_norm::set): Likewise.
       * include/ext/hash_set (__gnu_ext::hash_set): Likewise.
       (__gnu_ext::hash_multiset): Likewise.

From-SVN: r74944
2003-12-22 11:32:34 -08:00
Paolo Carlini a827daa06b locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2...
2003-12-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	first look for decimal_point and thousands_sep, when parsing
	sign, leading zeros (and 0, Ox, 0X for integer types) too.
	* testsuite/22_locale/num_get/get/char/12.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.

	* testsuite/22_locale/num_get/get/char/11.cc: Add a comment.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r74932
2003-12-22 11:00:43 +00:00
Jason Merrill c703c3900e atomicity.h: Fix oversight in previous change.
* config/cpu/powerpc/atomicity.h: Fix oversight in previous
        change.

From-SVN: r74890
2003-12-20 13:45:30 -05:00
Jerry Quinn 3101fa3c06 TODO: Update.
2003-12-20  Jerry Quinn  <jlquinn@optonline.net>

	* docs/doxygen/TODO: Update.
	* include/bits/locale_classes.h (locale, facet, id): Document.
	* include/bits/locale_facets.tcc (has_facet, use_facet): Document.

From-SVN: r74884
2003-12-20 15:51:09 +00:00
Jason Merrill 46eb4b3989 atomicity.h: Remove memory clobbers.
* config/cpu/cris/atomicity.h: Remove memory clobbers.
        * config/cpu/mips/atomicity.h: Likewise.
        * config/cpu/i486/atomicity.h: Remove memory clobbers.
        Split up read-write memory operand.
        * config/cpu/m68k/atomicity.h: Likewise.
        * config/cpu/powerpc/atomicity.h: Make memory I/O explicit.
        * config/cpu/s390/atomicity.h: Likewise.
        * config/cpu/sparc/atomicity.h: Likewise.

From-SVN: r74870
2003-12-19 22:08:42 -05:00
Carlo Wood 6fe68b3740 * bits/demangle.h
namespace __gnu_cxx::demangler
(session<Allocator>::decode_encoding): Put the postfix
of the return type of (member) functions after the function
instead of after the return type.

From-SVN: r74853
2003-12-19 23:15:24 +00:00
Jerry Quinn 2dbd0234aa 2003-12-19 Jerry Quinn <jlquinn@optonline.net>
* include/bits/locale_facet.h
        (__ctype_abstract_base,ctype<charT>,ctype<char>,ctype<wchar_t>):
        Document.

From-SVN: r74848
2003-12-19 20:44:18 +00:00
Paolo Carlini cc16f8b948 locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2, p8-9, first look for decimal_point and thousands_sep.
2003-12-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int,
	num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
	first look for decimal_point and thousands_sep.
	* testsuite/22_locale/num_get/get/char/11.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.

From-SVN: r74841
2003-12-19 18:14:22 +00:00
Paolo Carlini 1b4513069a locale_facets.tcc (num_get::_M_extract_float): When __found_sci becomes true stop eating thousands separators and the decimal...
2003-12-19  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_float):
	When __found_sci becomes true stop eating thousands separators
	and the decimal radix separator.
	* testsuite/22_locale/num_get/get/char/9.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/9.cc: Likewise.

	* config/locale/generic/c_locale.cc (__convert_to_v): Don't
	check that *__sanity == '\0': parsing may stop earlier, still
	be successful.
	* config/locale/gnu/c_locale.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/10.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/10.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
	Tweak in one place accordingly.

	* testsuite/22_locale/money_get/get/char/1.cc: Fix typo.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.

From-SVN: r74826
2003-12-19 09:35:24 +00:00
Benjamin Kosnik 4d54539c8f stl_list.h: Formatting tweaks.
2003-12-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_list.h: Formatting tweaks.
	* include/bits/list.tcc: Same.

From-SVN: r74795
2003-12-18 20:23:04 +00:00
Matt Austern 8a1d8dd9c8 demangle.h: Fix allocator type correctness, i.e.
* include/bits/demangle.h: Fix allocator type correctness,
	i.e. make sure that when we instantiate a container with a value
	type and an allocator, the allocator's value type matches the
	container's.
	* include/bits/stl_deque.h (_Deque_alloc_base): Eliminate.
	(_Deque_base): inherit directly from the deque's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_Deque_alloc_base.
	* include/bits/stl_list.h (_List_alloc_base): Eliminate.
	(_List_base): Inherit directly from the list's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_List_alloc_base.
	* include/bits/stl_vector.h (_Vector_alloc_base): Eliminate
	(_Vector_base): Inherit directly from the vector's allocator.  Use
	rebinding instead of _Alloc_traits.  Pick up data members from
	_Vector_alloc_base.
	* include/ext/hashtable.h: Fix allocator type correctness (the
	vector of buckets must be passed an allocator for objects of
	type _Node*).  Use rebinding instead of _Alloc_traits.

From-SVN: r74787
2003-12-18 18:35:38 +00:00
Paolo Carlini 7e08b3b816 locale_facets.tcc (time_get::_M_extract_via_format): Use narrow to get from __format[__i] a char __c representing a formatting code...
2003-12-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Use narrow to get from __format[__i] a char __c representing a
	formatting code, don't use it to compare *__beg to __format[__i].
	* testsuite/22_locale/time_get/get_date/wchar_t/4.cc: New.

From-SVN: r74755
2003-12-17 22:14:09 +00:00
Paolo Carlini cbf22cc549 container_benchmark.cc: Tweak outputs.
2003-12-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: Tweak outputs.

	* testsuite/performance/list_create_fill_sort.cc: Shrink a
	bit some outputs.

	* testsuite/testsuite_performance.h: Widen a few output fields.

	* testsuite/performance/ifstream_extract_int.cc: New.

From-SVN: r74738
2003-12-17 10:16:03 +00:00
Phil Edwards 2d52e9e364 configure.ac (AM_INIT_AUTOMAKE): Don't warn about GNU Make.
2003-12-16  Phil Edwards  <phil@codesourcery.com>

	* configure.ac (AM_INIT_AUTOMAKE):  Don't warn about GNU Make.
	* configure:  Regenerated.
	* Makefile.am (check-%):  New catch-all forwarding target.
	* Makefile.in:  Regenerated.

From-SVN: r74718
2003-12-16 23:44:53 +00:00
Paolo Carlini 93cbdb1a0c container_benchmark.cc: New...
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: New, a
	benchmark developed by Bjarne Stroustrup and Alexander
	Stepanov and made available with no restrictions.

	* testsuite/testsuite_performance.h (report_header): New,
	useful to produce header lines in the reports.

From-SVN: r74713
2003-12-16 22:44:19 +00:00
Jonathan Wakely d159598dda howto.html: Document shrink-to-fit reserve().
2003-12-16  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/21_strings/howto.html: Document shrink-to-fit reserve().
	* docs/html/faq/index.html: Reducing vector's capacity() to size().
	* docs/html/documentation.html, docs/html/faq/index.txt: Regenerate.

From-SVN: r74695
2003-12-16 13:57:55 +00:00
Paolo Carlini b1660ae9ea narrow_widen_char.cc: Tweak the number of iterations for each test.
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/narrow_widen_char.cc: Tweak the
	number of iterations for each test.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add a
	missing clear_counters.

From-SVN: r74692
2003-12-16 13:25:23 +00:00
Paolo Carlini 9a1349b920 re PR libstdc++/11723 (ctype<wchar_t>::do_is(mask, wchar_t) is slow)
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11723
	* include/bits/locale_facets.h: Add _M_bit and _M_wmask,
	used to speed up the computation of ctype::do_is.
	* config/locale/generic/ctype_members.cc
	(_M_initialize_ctype): Fill _M_bit and _M_wmask.
	(ctype::do_is): Use _M_bit and _M_wmask.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/is_wchar_t.cc: New.

	* testsuite/performance/narrow_widen_wchar_t.cc: Tweak
	string literal (incorrect citation ;)

	* include/bits/locale_facets.h: Minor tweaks, const
	correctness, unsigned -> size_t.

From-SVN: r74686
2003-12-16 11:00:52 +00:00
Jerry Quinn 84cea62612 locale_facets.h (widen, narrow): Uncomment the intended code.
2003-12-16  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.h (widen, narrow):  Uncomment the
	intended code.

From-SVN: r74668
2003-12-16 05:39:36 +00:00
Jerry Quinn 3fc63c15b4 ctype_noninline.h, [...] (ctype): Initialize _M_narrow, _M_widen.
2003-12-15  Jerry Quinn  <jlquinn@optonline.net>

        * config/os/aix/ctype_noninline.h,
	config/os/bsd/freebsd/ctype_noninline.h,
	config/os/bsd/netbsd/ctype_noninline.h,
	config/os/djgpp/ctype_noninline.h,
	config/os/generic/ctype_noninline.h,
	config/os/gnu-linux/ctype_noninline.h,
	config/os/hpux/ctype_noninline.h,
	config/os/irix/irix5.2/ctype_noninline.h,
	config/os/irix/irix6.5/ctype_noninline.h,
	config/os/mingw32/ctype_noninline.h,
	config/os/newlib/ctype_noninline.h,
	config/os/qnx/qnx6.1/ctype_noninline.h,
	config/os/solaris/solaris2.5/ctype_noninline.h,
	config/os/solaris/solaris2.6/ctype_noninline.h,
	config/os/solaris/solaris2.7/ctype_noninline.h,
	config/os/vxworks/ctype_noninline.h,
	config/os/windiss/ctype_noninline.h (ctype):  Initialize
	_M_narrow, _M_widen.
	* include/bits/locale_facets.h (_M_widen, _M_widen_ok,
	_M_narrow, _M_narrow_ok): New.
	(widen, narrow): Use tables to bypass virtual functions.
	(_M_widen_init, _M_narrow_init): New.

From-SVN: r74662
2003-12-16 01:57:03 +00:00
Carlo Wood 91daef582a ios_base.h (Init::_S_initialized): Change into declaration.
* include/bits/ios_base.h (Init::_S_initialized): Change into declaration.
* src/ios_init.cc (Init::_S_initialized): Add definition.

From-SVN: r74656
2003-12-16 00:15:24 +00:00
Benjamin Kosnik 3fe1373814 re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale())
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12658
	* include/Makefile.am (bits_headers): Add concurrence.h.
	* include/Makefile.in: Regenerated.
	* include/bits/concurrence.h: New.
	* src/locale_init.cc: Use it.
	(locale::locale): Lock critical regions.
	(locale::global): Same.

From-SVN: r74648
2003-12-15 21:08:03 +00:00
Benjamin Kosnik 1313d87fd3 basic_string.h: Change _*_references to _*_refcount.
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_string.h: Change _*_references to _*_refcount.
	* include/bits/locale_classes.h: Same.
	* src/locale.cc: Same.
	* src/locale_name.cc: Same.
	* src/locale_init.cc: Same.

From-SVN: r74645
2003-12-15 19:48:50 +00:00
Benjamin Kosnik fa972243f6 re PR libstdc++/12855 (Thread safety problems in ios_base::Init)
2003-12-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12855
	* include/bits/ios_base.h (Init::_S_ios_base_init): Change to
	_S_refcount, make atomic.
	* src/ios.cc: Adjust definition.
	* src/ios_init.cc (ios_base::Init::Init): Use __exchange_and_add,
	and __atomic_add.
	(ios_base::Init::~Init): Same.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

From-SVN: r74642
2003-12-15 19:03:13 +00:00
Paolo Carlini ca13fb7f5d locale_facets.tcc (num_get::do_get(bool&)): Fail as soon as the begins of both truename and falsename stop to match...
2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::do_get(bool&)):
	Fail as soon as the begins of both truename and falsename
	stop to match; always leave __beg one position beyond the
	last char successfully matched.
	* testsuite/22_locale/num_get/get/char/8.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/8.cc: Likewise.

2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (_M_widen): Reserve space
	for all the possible widened chars.
	* config/locale/generic/ctype_members.cc (_M_initialize_ctype):
	Compute at construction time all the possible widened chars.
	(do_widen): Tweak, simplify.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add tests
	for the array versions.

From-SVN: r74636
2003-12-15 16:56:42 +00:00
Paolo Carlini e3c0c0989b re PR libstdc++/13341 (ctype<wchar_t>::do_narrow(wchar_t, char) is slow)
2003-12-12  Paolo Carlini  <pcarlini@suse.de>
	    Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13341
	* include/bits/locale_facets.h (ctype<wchar_t>): Declare
	_M_initialize_ctype() and _M_narrow_ok, _M_narrow and _M_widen.
	* src/ctype.cc (ctype<wchar_t>::ctype(size_t),
	ctype<wchar_t>::ctype(__c_locale, size_t)): Use
	_M_initialize_ctype to fill _M_narrow and _M_widen.
	(ctype_byname<wchar_t>::ctype_byname(const char*, size_t)):
	Likewise.
	* config/locale/generic/ctype_members.cc (do_narrow, do_widen)
	Use _M_narrow and _M_widen when possible, instead of calling
	wctob and btowc, respectively.
	(_M_initialize_ctype): Define, it fills at construction time
	_M_narrow and _M_widen.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: New.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r74580
2003-12-12 19:44:17 +00:00
Jonathan Wakely a7bc3cdc85 index.txt: Regenerate after adding <link> tags.
2003-12-12  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.txt: Regenerate after adding <link> tags.

From-SVN: r74563
2003-12-12 10:55:43 +00:00
Neil Ferguson cbc6795585 basic_string.tcc (reserve): Allow shrink-to-fit.
2003-12-11  Neil Ferguson  <nferguso@eso.org>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (reserve): Allow shrink-to-fit.
	* testsuite/21_strings/basic_string/capacity/1.cc: Tweak.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Ditto.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Ditto.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r74551
2003-12-11 22:29:12 +00:00
Benjamin Kosnik 645112ddcc re PR libstdc++/6243 (testsuite fails almost all tests due to no libintl in LD_LIBRARY_PATH during test.)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6243
	* testsuite/lib/libstdc++.exp (v3-init): Add
	original_ld_library_path, calculate ld_library path, set
	LD_LIBRARY_PATH to both. Based on libjava.exp.

From-SVN: r74521
2003-12-11 01:08:14 +00:00
Benjamin Kosnik 9f503dd352 re PR libstdc++/11612 (abi_check not finding correct libgcc_s.so.1)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Oliva  <aoliva@redhat.com>

	PR libstdc++/11612
	* testsuite/Makefile.am (GLIBCXX_DIR): New.
	(GLIBGCC_DIR): New.
	(CXXLINK): Use both with -R so libtool links the correct libs.

Co-Authored-By: Alexandre Oliva <aoliva@redhat.com>

From-SVN: r74508
2003-12-10 21:43:10 +00:00
Paolo Carlini 3090572ce2 re PR libstdc++/13217 (basic_filebuf::underflow doesn't deal gracefully with read errors)
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13217
	* include/bits/fstream.tcc (underflow): Deal gracefully with
	read errors: throw ios_base::failure.

From-SVN: r74506
2003-12-10 20:05:00 +00:00
Benjamin Kosnik 35d6801ebe re PR libstdc++/10063 (stdio_filebuf broken)
2003-12-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/10063
	* config/io/basic_file_stdio.cc (__basic_file::sys_open): Sync.
	* testsuite/ext/stdio_filebuf/char/10063-1.cc: New.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: New.

From-SVN: r74505
2003-12-10 17:37:25 +00:00
Paolo Carlini e8c5fc6649 locale_facets.tcc (num_put::do_put(void*)): Remove the try/catch, not necessary.
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_put::do_put(void*)):
	Remove the try/catch, not necessary.

From-SVN: r74493
2003-12-10 10:06:19 +00:00
Paolo Carlini 9877afe873 12438.cc: Tweak memory limit and iterations to avoid spurious failures on some 64 bit...
2003-12-10  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12438.cc: Tweak memory
	limit and iterations to avoid spurious failures on some
	64 bit machines.

From-SVN: r74489
2003-12-10 09:26:50 +00:00
Benjamin Kosnik 5ec3f5662c linker-map.gnu: Remove private ios_base members from export list.
2003-12-09  Benjamin Kosnik  <bkoz@redhat.com>

        * config/linker-map.gnu: Remove private ios_base members from
        export list.

        * config/cpu/alpha/atomicity.h: Consistently format.
        * config/cpu/cris/atomicity.h: Same.
        * config/cpu/generic/atomicity.h: Same.
        * config/cpu/hppa/atomicity.h: Same.
        * config/cpu/i386/atomicity.h: Same.
        * config/cpu/i486/atomicity.h: Same.
        * config/cpu/ia64/atomicity.h: Same.
        * config/cpu/m68k/atomicity.h: Same.
        * config/cpu/mips/atomicity.h: Same.
        * config/cpu/powerpc/atomicity.h: Same.
        * config/cpu/s390/atomicity.h: Same.
        * config/cpu/sparc/atomicity.h: Same.

From-SVN: r74486
2003-12-10 04:52:37 +00:00
Benjamin Kosnik 8602555360 re PR libstdc++/13296 (unnecessary libunwind support in libstdc++-v3)
2003-12-09  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13296
	* acinclude.m4 (GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS): Remove.
	* aclocal.m4: Regenerate.
	* configure.ac: Remove call to GLIBCXX_ENABLE_LIBUNWIND_EXCEPTIONS.
	* conigure: Regenerate.
	* src/Makefile.am (libstdc___la_LDFLAGS): Remove LIBUNWIND_FLAGS.
	* src/Makefile.in: Regenerate.
	* docs/html/17_intro/configury.html: Modify.

From-SVN: r74479
2003-12-10 00:05:36 +00:00
Paolo Carlini 7c1ca56950 demangle.h (struct implementation_details): Keep in comments the names of the unused parameters.
2003-12-09  Paolo Carlini  <pcaelini@suse.de>

	* include/bits/demangle.h (struct implementation_details):
	Keep in comments the names of the unused parameters.

From-SVN: r74478
2003-12-09 22:54:25 +00:00
Paolo Carlini 015fa9712b demangle.h (struct implementation_details): Fix unused parameters warning.
2003-12-09  Paolo Carlini  <pcaelini@suse.de>

	* include/bits/demangle.h (struct implementation_details):
	Fix unused parameters warning.

From-SVN: r74477
2003-12-09 22:45:21 +00:00
Paolo Carlini 1f3adac20c locale_facets.tcc (num_get::_M_extract_int): Slightly streamline the code dealing with overflows and the parsing of the sign.
2003-12-09  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_int):
	Slightly streamline the code dealing with overflows and the
	parsing of the sign.

From-SVN: r74476
2003-12-09 20:02:58 +00:00
Bernardo Innocenti fa30fe72d1 algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
	include/ext/enc_filebuf.h, include/ext/functional,
	include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
	include/ext/hashtable.h, include/ext/iterator,
	include/ext/malloc_allocator.h, include/ext/memory,
	include/ext/mt_allocator.h, include/ext/numeric,
	include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
	include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
	include/ext/slist, include/ext/stdio_filebuf.h,
	include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.

From-SVN: r74464
2003-12-09 05:31:53 +01:00
Bernardo Innocenti 526da49cc7 bitset, [...]: Remove trailing whitespace.
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
	include/debug/formatter.h, include/debug/hash_map.h,
	include/debug/hash_multimap.h, include/debug/hash_multiset.h,
	include/debug/hash_set, include/debug/hash_set.h, include/debug/list,
	include/debug/map.h, include/debug/multimap.h,
	include/debug/multiset.h, include/debug/safe_base.h,
	include/debug/safe_iterator.h, include/debug/safe_iterator.tcc,
	include/debug/safe_sequence.h, include/debug/set.h,
	include/debug/string, include/debug/vector: Remove trailing whitespace.

From-SVN: r74463
2003-12-09 05:26:28 +01:00
Bernardo Innocenti 23131008f6 iso646.h, [...]: Remove trailing whitespace.
* include/c_compatibility/iso646.h, include/c_compatibility/limits.h,
	include/c_compatibility/locale.h, include/c_compatibility/stdio.h,
	include/c_compatibility/string.h, include/c_compatibility/time.h,
	include/c_compatibility/wchar.h, include/c_compatibility/wctype.h:
	Remove trailing whitespace.

From-SVN: r74460
2003-12-09 04:51:46 +01:00
Bernardo Innocenti 7dd8177fc7 cmath.tcc, [...]: Remove trailing whitespace.
* include/c_std/cmath.tcc, include/c_std/std_cassert.h,
	include/c_std/std_cctype.h, include/c_std/std_cmath.h,
	include/c_std/std_cstddef.h, include/c_std/std_cstdio.h,
	include/c_std/std_cstdlib.h, include/c_std/std_cstring.h,
	include/c_std/std_cwchar.h, include/c_std/std_cwctype.h:
	Remove trailing whitespace.

From-SVN: r74458
2003-12-09 04:44:35 +01:00
Bernardo Innocenti 7b74e24ee2 std_cctype.h, [...]: Remove trailing whitespace.
* include/c/std_cctype.h, include/c/std_cmath.h,
	include/c/std_cstdlib.h include/c/std_cwchar.h,
	include/c/std_cwctype.h: Remove trailing whitespace.

From-SVN: r74457
2003-12-09 04:41:52 +01:00
Bernardo Innocenti e64738b308 algo.h, [...]: Remove trailing whitespace.
* include/backward/algo.h, include/backward/algobase.h,
	include/backward/alloc.h, include/backward/complex.h,
	include/backward/defalloc.h, include/backward/function.h,
	include/backward/iterator.h, include/backward/new.h,
	include/backward/ostream.h, include/backward/queue.h,
	include/backward/rope.h, include/backward/stream.h,
	include/backward/streambuf.h, include/backward/strstream,
	include/backward/tempbuf.h, include/backward/tree.h,
	include/backward/vector.h: Remove trailing whitespace.

From-SVN: r74455
2003-12-09 04:27:10 +01:00
Paolo Carlini 0fa96a6006 c_locale.cc (__convert_to_v(long&), [...]): Remove.
2003-12-08  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc (__convert_to_v(long&),
	__convert_to_v(unsigned long&), __convert_to_v(long long&),
	__convert_to_v(unsigned long long&): Remove.
	(__convert_to_v(float&), __convert_to_v(double&),
	__convert_to_v(long double&)): Remove last unused parameter.
	* config/locale/gnu/c_locale.cc: Likewise.
	* include/bits/locale_facets.h: Likewise.
	(num_get::_M_extract_int): Update declaration.
	(class __num_base): Tweak _S_ie and _S_iE according to the
	_S_atoms_in changes.
	* include/bits/locale_facets.tcc (num_get::_M_extract_int):
	Provide directly the final _ValueT, not a string: accumulate
	the result checking for overflow at each digit.
	(num_get::do_get(bool&), num_get::do_get(long&),
	num_get::do_get(unsigned short&), num_get::do_get(unsigned int&),
	num_get::do_get(unsigned long&), num_get::do_get(long long&),
	num_get::do_get(unsigned long long&), num_get::do_get(void*&)):
	Use the new _M_extract_int, simplify.
	* src/locale-inst.cc (num_get::_M_extract_int(long&),
	num_get::_M_extract_int(unsigned short&),
	num_get::_M_extract_int(unsigned int&),
	num_get::_M_extract_int(unsigned long&),
	num_get::_M_extract_int(long long&),
	num_get::_M_extract_int(unsigned long long&): Instantiate.
	* src/locale_facets.cc (__num_base::_S_atoms_in): Reorder
        the chars in the natural order: abcdefABCDEF.

From-SVN: r74423
2003-12-08 15:37:03 +00:00
David S. Miller 09755a8512 re PR libstdc++/12496 (wrong result for __atomic_add(&value, -1) when using -O0 -m64)
2003-12-08  David S. Miller  <davem@redhat.com>

	PR libstdc++/12496
	* config/cpu/sparc/atomicity.h (__exchange_and_add, __atomic_add):
	Extend increment to _Atomic_word before giving to assembler.

From-SVN: r74409
2003-12-08 02:01:01 -08:00
Benjamin Kosnik 57616df1c3 13189.cc: Guard for __enc_traits.
2003-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/ext/enc_filebuf/char/13189.cc: Guard for __enc_traits.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.

From-SVN: r74380
2003-12-07 04:15:16 +00:00
Benjamin Kosnik e80213d249 re PR libstdc++/11691 (stdio_filebuf leaks FILE buffer when "no close" is requested)
2003-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/11691
	* include/ext/stdio_filebuf.h (stdio_filebuf::stdio_filebuf):
	Remove __del argument to file descriptor constructor.
	* config/io/basic_file_stdio.h (__basic_file::sys_open): Remove
	bool argument.
	* config/io/basic_file_stdio.cc: Same.

From-SVN: r74379
2003-12-07 03:46:14 +00:00
Benjamin Kosnik 4213442917 re PR libstdc++/13189 (<ext/enc_filebuf.h> fails to compile)
2003-12-05  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13189
	* include/ext/enc_filebuf.h: Fix.
	* include/bits/fstream.tcc: Tweak formatting.
	* include/bits/postypes.h: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/streambuf.tcc: Same.
	* testsuite/ext/stdio_filebuf.cc: Split.
	* testsuite/ext/stdio_filebuf_2.cc: Split.
	* testsuite/ext/stdio_sync_filebuf_char.cc: Split.
	* testsuite/ext/stdio_sync_filebuf_wchar_t.cc: Split.
	* testsuite/ext/enc_filebuf/char/13189.cc: New.
	* testsuite/ext/enc_filebuf/wchar_t/13189.cc: New.
	* testsuite/ext/stdio_filebuf/char/1.cc: New.
	* testsuite/ext/stdio_filebuf/char/2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: New.
	* testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc: New.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc: New.

From-SVN: r74313
2003-12-05 06:54:24 +00:00
Carlo Wood 69f73bd395 re PR libstdc++/13045 (Demangler does demangle floating values.)
PR libstdc++/13045
* bits/demangle.h
namespace __gnu_cxx::demangler
(enum substitution_nt): Removed trailing comma.
(implementation_details): Added.
(session<Allocator>::M_implementation_details): Added.
(session<Allocator>::session): Pass implementation_details.
(session<Allocator>::decode_encoding): Same.
(session<Allocator>::decode_real): Added.
(_GLIBCXX_DEMANGLER_STYLE_VOID _GLIBCXX_DEMANGLER_STYLE_LITERAL
_GLIBCXX_DEMANGLER_STYLE_LITERAL_INT
_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Replaced with
implementation_details equivalent.
(session<Allocator>::decode_expression):
Use M_implementation_details instead of macros. Add extra parentheses
around 'larger than' operator in expressions in template arguments.
(session<Allocator>::decode_bare_function_type): Idem.
(session<Allocator>::decode_literal):
Idem, and call decode_real for floating literals.
(session<Allocator>::decode_type_with_postfix): Put the postfix
of the return type of (member) functions after the function
instead of after the return type.  Also, put a space after the
prefix of qualified function pointers: "int (* const<space>".
* src/demangle.cc: include most dependent header file first.
* testsuite/demangle/regression/cw-16.cc: Updated two
and added three tests.

From-SVN: r74304
2003-12-05 02:40:53 +00:00
Benjamin Kosnik 82fa4538b5 re PR libstdc++/13284 (126 g++ failures due to lrand48 not defined)
2003-12-04  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13284
	* include/bits/stl_algo.h (__random_number): Remove.
	(random_shuffle): Use rand, as permitted by DR 395.
	* include/ext/algorithm: Same.
	* linkage.m4 (GLIBCXX_CHECK_STDLIB_SUPPORT): Remove lrand48.
	* acconfig.h: Same.
	* crossconfig.m4: Remove HAVE_DRAND48, HAVE_LRAND48.
	* config.h.in: Regenerated.
	* configure: Same.
	* aclocal.m4: Same.

From-SVN: r74288
2003-12-04 19:37:21 +00:00
Paolo Carlini 7f1156ed35 re PR libstdc++/12653 (Resolution of DR 303 (WP) still unimplemented)
2003-12-04  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12653
	* include/std/std_bitset.h (operator>>): Implement resolution
	of DR 303 [WP]: use widen('0') and widen('1').
	* docs/html/ext/howto.html: Add an entry for DR 303.

	* include/std/std_bitset.h (operator>>): Implement the common
	requirements of formatted input functions (27.6.1.2.1).

	* include/std/std_bitset.h (operator>>): Set the failbit when
	nothing was extracted and _Nb != 0.
	* testsuite/23_containers/bitset/input/1.cc: New.

From-SVN: r74276
2003-12-04 09:45:29 +00:00
Paolo Carlini 3259561c4c re PR libstdc++/12791 (_M_extract_num returns a wrong __beg in case of error)
2003-12-03  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12791
	* include/bits/locale_facets.tcc (time_get::_M_extract_num):
	Rewrite, stop the parsing as soon as a digit cannot possibly
	lead to a final number within the bounds; otherwise, simplify,
	avoiding __ctype.is() and atoi().
	* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
	* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.

	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Minor tweak: a 4-digit integer cannot be bigger than 9999.

	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
	type-correct wchar_t string literals.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.

From-SVN: r74220
2003-12-03 09:18:28 +00:00
Paolo Carlini 17e15f7f3b locale_facets.tcc (time_get::do_get_year): Avoid using a basic_string and calling a full blown strtol (via __convert_to_v)...
2003-12-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::do_get_year):
	Avoid using a basic_string and calling a full blown strtol
	(via __convert_to_v) for simple 2 or 4 digits, base 10,
	positive integers; simplify.

From-SVN: r74193
2003-12-02 18:30:42 +00:00
Paolo Carlini 142b798be5 2003-12-02 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): For case 3: and 4:
	exchanging 'if (__precedes)' and 'if (__space)' allows
	to factor out a few more assignments.

From-SVN: r74168
2003-12-02 09:16:30 +00:00
Benjamin Kosnik 6b98580b89 basic_ios.h (basic_ios::setstate): Revert.
2003-12-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_ios.h (basic_ios::setstate): Revert.
	* include/bits/istream.tcc: Only call setstate if __err != goodbit.
	* include/bits/ostream.tcc: Same.
	* testsuite/27_io/basic_ios/exceptions/char/2.cc: New.

	* testsuite/testsuite_io.h (__gnu_test::fail_streambuf): Make
	internal buffer non-static.

From-SVN: r74151
2003-12-02 02:48:51 +00:00
Benjamin Kosnik d78e147a14 C++STYLE: Add exception bits.
2003-12-01  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/17_intro/C++STYLE: Add exception bits.
	* include/bits/fstream.tcc: Add location info to exception strings.

	* include/bits/stl_construct.h: Formatting tweaks.

From-SVN: r74119
2003-12-01 18:48:24 +00:00
Paolo Carlini 9dbaa9489f re PR libstdc++/10378 ([library DR 402] cannot add object with inplace new into STL collections)
2003-12-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/10378
	* include/bits/allocator.h (allocator::construct): Implement
	resolution of DR 402 [Ready] (in Revision 28).
	* include/bits/allocator_traits.h (__allocator::construct):
	Likewise.
	* include/bits/stl_construct.h (_Construct): Likewise.
	* testsuite/20_util/allocator_members.cc: Move to...
	* testsuite/20_util/allocator/1.cc: ... here.
	* testsuite/20_util/allocator/10378.cc: New.
	* docs/html/ext/howto.html: Add an entry for DR 402.

From-SVN: r74104
2003-12-01 15:34:07 +00:00
Paolo Carlini 1644f06da7 codecvt_members.cc (codecvt::do_in, [...]): More minor tweaks.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in,
	codecvt::do_length): More minor tweaks.

From-SVN: r74069
2003-11-30 19:10:50 +00:00
Paolo Carlini 11816ba280 codecvt_members.cc (codecvt::do_in): Minor stylistic tweak.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in):
	Minor stylistic tweak.

From-SVN: r74060
2003-11-30 15:18:27 +00:00
Paolo Carlini 6c39c2075a locale_facets.tcc (num_put::do_put(..., bool)): Minor tweaks, consistent with the style used in other facets.
2003-11-30  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_put::do_put(..., bool)):
	Minor tweaks, consistent with the style used in other facets.

From-SVN: r74056
2003-11-30 11:33:23 +00:00
Paolo Carlini 4da2b96035 fstream.tcc (underflow): Minor tweaks in preparation for libstdc++/13217.
2003-11-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/fstream.tcc (underflow): Minor tweaks in
	preparation for libstdc++/13217.

From-SVN: r74038
2003-11-29 22:49:46 +00:00
Paolo Carlini 2d25605a54 13171-2.cc: Tweak for a few small problems (fix timings, use VERIFY..)
2003-11-29  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc:
	Tweak for a few small problems (fix timings, use VERIFY..)

From-SVN: r74034
2003-11-29 17:42:16 +00:00
Paolo Carlini 05a47a473d 13171-3.cc: Remove.
2003-11-28  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: Remove.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: New,
	the original third testcase for libstdc++/13171 belong here.

From-SVN: r74017
2003-11-28 10:24:27 +00:00
Paolo Carlini ac912ba1db 13171-3.cc: Remove extraneous wchar_t lines.
2003-11-28  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc:
	Remove extraneous wchar_t lines.

From-SVN: r74016
2003-11-28 08:02:51 +00:00
Paolo Carlini 5536b61c1e re PR libstdc++/11544 (wifstream conversion errors result in wrong rdstate())
2003-11-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11544
	PR libstdc++/11603
	* include/bits/fstream.tcc (underflow): Throw ios_base:failure
	upon incomplete or invalid byte sequences in the file.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-1.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-2.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc: New.

From-SVN: r74000
2003-11-27 17:56:05 +00:00
Paolo Carlini fb8d463851 std_streambuf.h (__copy_streambufs): Remove the first, unused, basic_ios<> parameter.
2003-11-27  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_streambuf.h (__copy_streambufs): Remove
	the first, unused, basic_ios<> parameter.
	* src/streambuf-inst.cc: Likewise.
	* include/bits/streambuf.tcc: Likewise.
	* include/bits/istream.tcc (operator>>(__streambuf_type*)):
	Tweak accordingly the call.
	* include/bits/ostream.tcc (operator<<(__streambuf_type*)):
	Likewise.

	* include/bits/streambuf.tcc (__copy_streambufs): Remove
	redundant try/catch.

From-SVN: r73992
2003-11-27 13:13:19 +00:00
Benjamin Kosnik 12841eb3d0 re PR libstdc++/9371 (Bad exception handling in i/ostream::operator>>/<<(streambuf*))
2003-11-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/9371
	PR libstdc++/9546
	PR libstdc++/10093
	PR libstdc++/10095
	* include/bits/basic_ios.h (basic_ios::setstate): Elide if goodbit.
	(basic_ios::_M_setstate): Consolidate common error handling code.
	* include/bits/basic_ios.tcc: Tweak.
	* include/bits/fstream.tcc: Tweak.
	* include/bits/istream.tcc: Use _M_setstate for common exception
	handling. Move setstate calls after catch.
	(basic_istream::tellg): Check for exceptions thrown by streambuf
	virtual functions.
	(basic_istream::seekg): Same.
	* include/bits/ostream.tcc: Same, but for ostream.
	(basic_ostream::flush): Check for exceptions thrown by streambuf
	virtual functions.
	(basic_istream::tellp): Same.
	(basic_istream::seekp): Same.
	* include/bits/locale_facets.tcc: Tweak.
	* include/bits/streambuf.tcc: Tweak.
	(__copy_streambufs): Propagate exceptions.
	* testsuite/testsuite_io.h (fail_streambuf): New.
	(fail_num_get): New.
	(fail_num_put): New.
	(facet_error): New.
	(underflow_error): New.
	(overflow_error): New.
	(positioning_error): New.
	* testsuite/27_io/basic_istream/exceptions/char/9561.cc: Tweak.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
        exceptions_badbit_throw.cc, exceptions_failbit.cc,
        exceptions_failbit_throw.cc: New.
	* testsuite/27_io/basic_istream/extractors_other/char/
	error_failbit.cc, exceptions_badbit_throw.cc,
        exceptions_failbit_throw.cc, exceptions_null.cc: New.
	* testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_istream/tellg/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/
	exceptions_badbit_throw.cc, exceptions_failbit_throw.cc: New.
	* testsuite/27_io/basic_ostream/inserters_other/char/
	error_failbit.cc, exceptions_badbit_throw.cc,
        exceptions_failbit_throw.cc, exceptions_null.cc: New.
	* testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
	New.
	* testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
	New.

From-SVN: r73979
2003-11-27 08:14:25 +00:00
Benjamin Kosnik 48f499cf81 re PR libstdc++/12297 (istream::sentry::sentry() handles eof() incorrectly.)
2003-11-26  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/12297
	* include/bits/istream.tcc
	(basic_istream::sentry::sentry): Set failbit and eofbit when eof.
	* testsuite/27_io/basic_istream/sentry/char/12297.cc: New.

From-SVN: r73968
2003-11-26 22:45:56 +00:00
Paolo Carlini c03d83d499 re PR libstdc++/13171 (Bugs in basic_filebuf::imbue)
2003-11-26  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/13171
	* include/bits/fstream.tcc (imbue): Relax the conditions under
	which the function succeeds: allow for two consecutive calls with
	the same name; state dependent encodings are ok even after open
	if at the beginning of the file; don't check seekoff return value
	(pipes, cin, cout, etc...)
	* testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak comment.
	* testsuite/27_io/basic_filebuf/imbue/char/3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Tweak comment.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: Likewise.

	* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: More
	correctly use the UTF-8 locale appearing in the PR.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r73954
2003-11-26 15:56:40 +00:00
Paolo Carlini 7fb1d71193 2003-11-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Avoid zeroing _M_grouping,
	_M_truename and _M_falsename: the constructor always does
	it immediately before the _M_cache call.

From-SVN: r73948
2003-11-26 11:47:01 +00:00
Paolo Carlini 5af91f0690 codecvt_members.cc (codecvt::do_length): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-25  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_length):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweaks.
	(codecvt::do_in): Tweaks, improve the code dealing with errors.
	* testsuite/performance/wchar_t_length.cc: New.

From-SVN: r73934
2003-11-25 21:41:28 +00:00
Paolo Carlini 3c8797ae81 codecvt_members.cc (codecvt::do_in): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweak.
	* testsuite/performance/wchar_t_in.cc: New.

2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Set _M_allocated at the beginning
	in order to avoid memory leaks; simplify a bit.

From-SVN: r73893
2003-11-24 21:13:38 +00:00
Benjamin Kosnik e0ec69c929 streambuf_iterator.h (ostreambuf_iterator): Remove non-standard throw specs.
2003-11-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/streambuf_iterator.h (ostreambuf_iterator): Remove
	non-standard throw specs.
	* testsuite/24_iterators/istreambuf_iterator.cc: Split into...
	* testsuite/24_iterators/istreambuf_iterator/1.cc
	* testsuite/24_iterators/istreambuf_iterator/2.cc
	* testsuite/24_iterators/istreambuf_iterator/2627.cc
	* testsuite/24_iterators/ostreambuf_iterator.cc: Split into...
	* testsuite/24_iterators/ostreambuf_iterator/1.cc
	* testsuite/24_iterators/ostreambuf_iterator/2.cc

	* testsuite/24_iterators/reverse_iterator/1.cc: Just compile,
	don't link.

	* include/bits/allocator.h: Formatting tweak.

From-SVN: r73892
2003-11-24 21:02:39 +00:00
Paolo Carlini ce492af354 locale_init.cc: Cosmetic reformatting.
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* src/locale_init.cc: Cosmetic reformatting.

From-SVN: r73882
2003-11-24 17:24:40 +00:00
Paolo Carlini bf058d221e locale_facets.tcc (__add_grouping): Cosmetic reformatting.
2003-11-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (__add_grouping):
	Cosmetic reformatting.

From-SVN: r73854
2003-11-23 14:49:54 +00:00
Paolo Carlini 89a2fb9092 locale_facets.tcc (_M_extract_float, [...]): Remove a wrong comment and simplify the corresponding code using...
2003-11-23  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (_M_extract_float,
	_M_extract_int): Remove a wrong comment and simplify
	the corresponding code using char_traits::find().

From-SVN: r73853
2003-11-23 13:03:59 +00:00
Paolo Carlini cc0c2f7986 2003-11-22 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): Factor out two assignments.

From-SVN: r73844
2003-11-22 18:47:13 +00:00
Paolo Carlini a3b1b80447 istream.tcc (getline(basic_string<>&)): Fix error in comment of the previous commit.
2003-11-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (getline(basic_string<>&)):
        Fix error in comment of the previous commit.

From-SVN: r73836
2003-11-22 11:41:41 +00:00
Paolo Carlini 1a311979dd re PR libstdc++/12593 (Resolution of DR 91 (WP) still unimplemented)
2003-11-22  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12593
	* include/bits/istream.tcc (operator>>(basic_string<>&),
	getline(basic_string<>&)): Implement resolution of DR 91 [WP];
	fix some minor issues with the exit conditions.
	* docs/html/ext/howto.html: Add an entry for DR 91.

From-SVN: r73835
2003-11-22 09:54:25 +00:00
Paolo Carlini f7ba331c2a 2003-11-21 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
	(money_base::_S_construct_pattern): Factor out an assignment.

From-SVN: r73816
2003-11-21 20:55:49 +00:00
Paolo Carlini 5c89246dfb PR libstdc++/12882 (partial)
2003-11-21  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12882 (partial)
	* acinclude.m4 (GLIBCXX_CHECK_LFS): Check fseeko64
	and ftello64 too.
	* include/ext/stdio_sync_filebuf.h (seekoff): Use fseeko64
	and ftello64 if available.
	* aclocal.m4: Regenerate.
	* configure: Ditto.

From-SVN: r73815
2003-11-21 20:30:12 +00:00
Benjamin Kosnik 9dc420e68d formatter.h: Use _Tp as template argument.
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/debug/formatter.h: Use _Tp as template argument.
	* src/debug.cc: Same, instantiate std::size_t.

From-SVN: r73792
2003-11-21 05:49:21 +00:00
Benjamin Kosnik 4be58168d3 re PR libstdc++/13109 (libstdc++-v3 bootstrap failure on Tru64 UNIX V4.0F: snprintf missing)
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13109
	* include/debug/formatter.h (_Error_formatter::_M_format_word): New.
	* src/debug.cc (__gnu_debug): Format.
	(_Error_formatter::_M_format_word): Define, use, instantiate.

From-SVN: r73770
2003-11-20 19:32:13 +00:00
Paolo Carlini 0fd1870171 re PR libstdc++/11602 (codecvt<wchar_t, char, mbstate_t> is slow.)
2003-11-20  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11602
	* config/locale/gnu/codecvt_members.cc (codecvt::do_out):
	Rewrite, using both wcsnrtombs and wcrtomb in a loop: the
	former is very fast, but stops if encounters a NUL.
	* testsuite/performance/wchar_t_out.cc: New, from the PR.

From-SVN: r73769
2003-11-20 19:24:03 +00:00
Paolo Carlini 1f33554abb codecvt_members.cc (do_out): If we can upper bound the total number of external chars to something smaller...
2003-11-19  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (do_out): If
	we can upper bound the total number of external chars
	to something smaller than __to_end - __to, avoid the
	temporary buffer, the memcopy and simplify the loop.
	* config/locale/generic/codecvt_members.cc (do_out):
	Likewise.

From-SVN: r73733
2003-11-19 11:38:40 +00:00
Andreas Tobler 90635952d1 libstdc++.exp: Add DYLD_LIBRARY_PATH for darwin.
2003-11-19  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/lib/libstdc++.exp: Add DYLD_LIBRARY_PATH for darwin.
	* testsuite/libstdc++-dg/normal.exp: Add -multiply_defined suppress
	flag.

From-SVN: r73724
2003-11-19 05:51:18 +01:00
Jonathan Wakely bc225f98dd configopts.html, [...]: Add <link> tags.
2003-11-18  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/configopts.html, docs/html/debug.html,
	docs/html/documentation.html, docs/html/explanations.html,
	docs/html/install.html, docs/html/17_intro/contribute.html,
	docs/html/17_intro/howto.html, docs/html/17_intro/license.html,
	docs/html/18_support/howto.html, docs/html/19_diagnostics/howto.html,
	docs/html/20_util/howto.html, docs/html/21_strings/howto.html,
	docs/html/22_locale/codecvt.html, docs/html/22_locale/ctype.html,
	docs/html/22_locale/howto.html, docs/html/22_locale/locale.html,
	docs/html/22_locale/messages.html, docs/html/23_containers/howto.html,
	docs/html/24_iterators/howto.html, docs/html/25_algorithms/howto.html,
	docs/html/26_numerics/howto.html, docs/html/27_io/howto.html,
	docs/html/ext/howto.html, docs/html/ext/sgiexts.html: Add <link> tags.

From-SVN: r73712
2003-11-18 20:56:12 +00:00
Paolo Carlini 2934246345 re PR libstdc++/12868 (basic_filebuf::imbue fails too easily)
2003-11-18  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12868
	* include/bits/fstream.tcc (imbue): For encodings != -1 it's
	always ok to imbue a new locale, provided seekoff(0, cur, ...)
	doesn't fail, of course.
	(underflow): In order for the above to work, deal gracefully
	with _M_codecvt->in returning codecvt_base::error while
	(__ilen = __iend - this->eback()) > 0: it just means __ilen
	correctly converted internal characters before an error.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: New.

From-SVN: r73697
2003-11-18 08:21:38 +00:00
Paolo Carlini c246639311 locale_facets.tcc: Fix typo in comment.
2003-11-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc: Fix typo in comment.

From-SVN: r73667
2003-11-17 08:54:09 +00:00
Paolo Carlini 6a7ee0d62e 8.cc: New test, summarizing the discussion ensuing libstdc++/12988.
2003-11-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/num_put/put/char/8.cc: New test,
	summarizing the discussion ensuing libstdc++/12988.
	* testsuite/22_locale/num_put/put/wchar_t/8.cc: Ditto.

From-SVN: r73665
2003-11-17 08:39:57 +00:00
Paolo Carlini 781a529886 std_fstream.h: Tweak a comment.
2003-11-15  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_fstream.h: Tweak a comment.

From-SVN: r73640
2003-11-16 00:55:51 +00:00
Roger Sayle c85dfef7a0 std_cmath.h: Don't import C99's float transcendentals into the __gnu_cxx::__c99_binding...
* include/c_std/std_cmath.h: Don't import C99's float transcendentals
	into the __gnu_cxx::__c99_binding namespace.
	(acos, asin, atan, atan2, ceil, cosh, exp, floor, fmod, frexp,
	ldexp, log, log10, modf, pow, sinh, tan, tanh): Implement using
	GCC's math builtins, i.e. __builtin_foo.
	* libmath/stubs.c (acosf, acosl, asinf, asinl, atanf, atanl,
	ceilf, ceill, floorf, floorl, fmodf, fmodl, frexpf, frexpl,
	ldexpf, ldexpl, modff, modfl): Provide stub implementations.

From-SVN: r73629
2003-11-15 14:26:47 +00:00
Paolo Carlini 38455b2b8b 12352.cc: Use __gnu_test::try_named_locale.
2003-11-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12352.cc: Use
	__gnu_test::try_named_locale.

From-SVN: r73602
2003-11-14 11:52:46 +00:00
Paolo Carlini c60cfc76be howto.html: Add entries for DR 63, 75 and 305; tweak entries for DR 60 and 328.
2003-11-14  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/howto.html: Add entries for DR 63, 75
	and 305; tweak entries for DR 60 and 328.

From-SVN: r73591
2003-11-14 09:30:22 +00:00
Douglas Gregor 1b80d64af2 debug.html: Users are allowed to specialize in namespace __gnu_debug...
2003-11-13  Douglas Gregor  <gregod@cs.rpi.edu>

	* docs/html/debug.html: Users are allowed to specialize in
	namespace __gnu_debug, unlike in the Apple version of the debug
	mode. Clear up a confusing double-negative. Note that
	std::basic_string does provide extra debugging capabilities, but
	not safe iterators.
	* include/bits/basic_string.tcc: Make sure there's never an
	ambiguity when calling __is_null_pointer.
	* include/debug/deque: (deque::erase) Properly handle invalidation
	when erasing at the end of the deque.
	* include/debug/vector: (vector::swap): Swap _M_guaranteed_capacity.
	(vector::clear): Set the guaranteed capacity to 0.
	* testsuite/23_containers/deque/invalidation/4.cc: (test04): Test
	iterator invalidation when erasing at the end of the deque.

From-SVN: r73564
2003-11-14 00:15:00 +00:00
Paolo Carlini a2dcfada8a re PR libstdc++/13007 (basic_streambuf::pubimbue, imbue wrong)
2003-11-13  Paolo Carlini  <pcarlini@suse.de>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/13007
	* include/bits/fstream.tcc (imbue): Don't touch the stored
	locale.
	* include/std/std_streambuf.h (imbue): According to the
	standard, base class version does nothing.
	(pubimbue): Store the locale.
	* testsuite/27_io/basic_filebuf/imbue/char/13007.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc: New.
	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/char/13007-1.cc: New.
	* testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc: New.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-1.cc: New.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc: New.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r73563
2003-11-13 23:13:22 +00:00
Petur Runolfsson 5681c890b6 re PR libstdc++/12594 (DRs 60 [TC] and 63 [TC] not implemented)
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.

From-SVN: r73551
2003-11-13 17:43:48 +00:00
Paolo Carlini f144e859cc 11305-1: Fix, closely following the testcase included in the PR.
2003-11-13  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1:
	Fix, closely following the testcase included in the PR.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4: Ditto.

From-SVN: r73548
2003-11-13 14:19:39 +00:00
Jonathan Wakely a198480e86 configury.html: XHTML tweak.
2003-11-13  Jonathan Wakely <redi@gcc.gnu.org>

	* docs/html/17_intro/configury.html: XHTML tweak.

From-SVN: r73529
2003-11-13 01:21:28 +00:00
Jonathan Wakely 684edd67f6 debug_mode.html: XHTML fixes.
2003-11-13  Jonathan Wakely <redi@gcc.gnu.org>

	* docs/html/debug_mode.html: XHTML fixes.

From-SVN: r73526
2003-11-13 00:49:58 +00:00
Benjamin Kosnik 89341602bb debug_mode.html: Update.
2003-11-12  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/debug_mode.html: Update.
	* docs/html/17_intro/TODO: Update.

From-SVN: r73525
2003-11-13 00:25:23 +00:00
Benjamin Kosnik f9d52373f8 c++config: Move using directive...
2003-11-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config: Move using directive...
	* include/debug/formatter.h: ...here.

From-SVN: r73486
2003-11-12 07:12:20 +00:00
Carlo Wood 22e5c8fa3c re PR libstdc++/12947 (Demangler bug)
PR libstdc++/12947
* bits/demangle.h
(_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS): Added.
(_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Added.
(session<Allocator>::next_peek() const): Added.
(decode_non_negative_decimal_integer(string_type&)):
Renamed from decode_decimal_integer(string_type&).
(session<Allocator>::decode_nested_name):
Decode <template_param> as well.
(session<Allocator>::add_substitution):
Handle <template-param> for <nested-name>'s.
(enum xary_nt): Added.
(struct entry_st): Added member `xary_nt type' instead of `bool unary'.
(symbol_name_table_c): Updated for `entry_st::type' and additional
operators (unary `operator+' and `sizeof(type)').
(offset_table_c): Updated for new operators (causing a new hash map).
(decode_operator_name): Match the updated hash map.
(session<Allocator>::decode_expression):
Support for `sizeof ([typename] type)' (st),
dependent names (sr) and casting operator (cv).  Handle
`entry_st::type'.  Handle _GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
and _GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME.
(session<Allocator>::decode_type_with_postfix):
Support `extern "C"' function types (FY).
* testsuite/demangle/regression/cw-16.cc: Added tests for the
added functionality.
* testsuite/demangle/regression/3111-2.cc: sizeof now has a space
appended.

From-SVN: r73480
2003-11-12 02:18:37 +00:00
Paolo Carlini dfad48c6e8 re PR libstdc++/12875 (Weird behaviour in basic_filebuf::setbuf())
2003-11-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12875
	* include/bits/fstream.tcc (setbuf): Don't do anything
	after open(), in particular don't discard data.
	(_M_allocate_internal_buffer): Tweak to not allocate memory
	in case the buffer is provided by the user via setbuf.
	* include/ext/stdio_filebuf.h: Tweak comment.
	* testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: New.
	* testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Tweak, now
	setbuf does nothing after open().
	* testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Likewise.

From-SVN: r73477
2003-11-12 01:14:34 +00:00
Benjamin Kosnik 285b36d6a5 [multiple changes]
2003-11-11  Doug Gregor  <gregod@cs.rpi.edu>

	* docs/html/debug.html: Document libstdc++ debug mode.
	* docs/html/debug_mode.html: Document libstdc++ debug mode design.
	* docs/html/test.html: Document how to test under debug mode.
	* docs/html/17_intro/howto.html: Document debug-mode macros.
	* include/Makefile.am: Install debug-mode headers.
	* src/Makefile.am: Include debug.cc.
	* include/bits/basic_string.tcc:
	  (basic_string::_S_construct): Fix NULL pointer check.
	  (__is_null_pointer): New.
	  Add precondition annotations.
	* include/bits/stream_iterator.h (istream_iterator,
	ostream_iterator): Added precondition annotations.
	* include/bits/streambuf_iterator.h (istreambuf_iterator): Ditto.
	* include/bits/stl_queue.h (queue, priority_queue): Ditto.
	* include/bits/stl_stack.h (stack): Ditto.
	* include/bits/basic_string.h (basic_string): Ditto.
	* include/bits/basic_string.tcc (basic_string): Ditto.
	* include/std/std_memory.h (auto_ptr): Ditto.
	* include/std/std_valarray.h (valarray): Ditto.
	* include/bits/stl_algo.h: Added algorithm precondition
	annotations.
	* include/bits/stl_algobase.h: Added algorithm precondition
	annotations.
	* include/bits/stl_numeric.h: Ditto.
	* include/ext/algorithm: Added algorithm precondition
	annotations.
	(__is_heap): Moved away from here.
	* include/bits/stl_heap.h: Added algorithm precondition
	annotations.
	(__is_heap): Moved to the top of this file.
	(__is_heap): Added iterator range overloads.
	* testsuite/20_util/auto_ptr_neg.cc: Fix line numbers to match up
	with changes in std_memory.h.
	* testsuite/23_containers/list/operators/4.cc: Don't verify
	performance guarantees when in debug mode.
	* testsuite/23_containers/bitset/invalidation/1.cc: New.
	* testsuite/23_containers/deque/invalidation/1.cc: New.
	* testsuite/23_containers/deque/invalidation/2.cc: New.
	* testsuite/23_containers/deque/invalidation/3.cc: New.
	* testsuite/23_containers/deque/invalidation/4.cc: New.
	* testsuite/23_containers/list/invalidation/1.cc: New.
	* testsuite/23_containers/list/invalidation/2.cc: New.
	* testsuite/23_containers/list/invalidation/3.cc: New.
	* testsuite/23_containers/list/invalidation/4.cc: New.
	* testsuite/23_containers/map/invalidation/1.cc: New.
	* testsuite/23_containers/map/invalidation/2.cc: New.
	* testsuite/23_containers/multimap/invalidation/1.cc: New.
	* testsuite/23_containers/multimap/invalidation/2.cc: New.
	* testsuite/23_containers/multiset/invalidation/1.cc: New.
	* testsuite/23_containers/multiset/invalidation/2.cc: New.
	* testsuite/23_containers/set/invalidation/1.cc: New.
	* testsuite/23_containers/set/invalidation/2.cc: New.
	* testsuite/23_containers/vector/invalidation/1.cc: New.
	* testsuite/23_containers/vector/invalidation/2.cc: New.
	* testsuite/23_containers/vector/invalidation/3.cc: New.
	* testsuite/23_containers/vector/invalidation/4.cc: New.
	* testsuite/25_algorithms/heap.cc: Don't verify
	performance guarantees when in debug mode.
	* include/debug/bitset: New.
	* include/debug/debug.h: New.
	* include/debug/deque: New.
	* include/debug/formatter.h: New.
	* include/debug/hash_map: New.
	* include/debug/hash_map.h: New.
	* include/debug/hash_multimap.h: New.
	* include/debug/hash_set: New.
	* include/debug/hash_set.h: New.
	* include/debug/hash_multiset.h: New.
	* include/debug/list: New.
	* include/debug/map: New.
	* include/debug/map.h: New.
	* include/debug/multimap.h: New.
	* include/debug/multiset.h: New.
	* include/debug/safe_base.h: New.
	* include/debug/safe_iterator.h: New.
	* include/debug/safe_iterator.tcc: New.
	* include/debug/safe_sequence.h: New.
	* include/debug/set: New.
	* include/debug/set.h: New.
	* include/debug/string: New.
	* include/debug/vector: New.
	* src/debug.cc: New.
	* config/linker-map.gnu: Add debug mode symbols.

2003-11-11  Benjamin Kosnik  <bkoz@redhat.com>

	* src/string-inst.cc: Tweak namespaces.
	* src/misc-inst.cc: Same.
	* docs/html/debug.html: Edits.
	* config/link-map.gnu: Remove cruft.

	* include/bits/c++config: Add in namespace associations.
	* include/std/std_bitset.h: Adjust namespace to __gnu_norm,
	comment tweaks.
	* include/bits/deque.tcc: Same.
	* include/bits/list.tcc: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/vector.tcc: Same.

	* include/std/std_algorithm.h: Remove markup comments.
	* include/std/std_functional.h: Same.
	* include/std/std_iterator.h: Same.
	* include/std/std_numeric.h: Same.
	* include/std/std_utility.h: Same.
	* include/bits/stl_queue.h: Formatting tweaks.
	* include/bits/stl_stack.h: Same.
	* include/std/std_deque.h: Include debugging version in debug mode.
	* include/std/std_list.h: Same.
	* include/std/std_map.h: Same.
	* include/std/std_set.h: Same.
	* include/std/std_vector.h: Same.
	* include/std/std_queue.h: Use deque, vector.
	* include/std/std_stack.h: Same.

From-SVN: r73459
2003-11-11 20:09:16 +00:00
Paolo Carlini f6a7db9ee1 locale_facets.tcc (_M_insert_int, [...]): Move a couple of vars inside an if block.
2003-11-09  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (_M_insert_int,
	_M_insert_float): Move a couple of vars inside an if block.

From-SVN: r73395
2003-11-09 19:15:25 +00:00
Paolo Carlini 7c752655e6 re PR libstdc++/12971 (Resolution of DR 328 [WP] still unimplemented)
2003-11-09  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12971
	* include/bits/locale_facets.tcc
	(money_put::do_put(..., long double)): Fix conversion
	specification as per DR 328 [WP].
	* testsuite/22_locale/money_put/put/char/12971.cc: Add.
	* testsuite/22_locale/money_put/put/wchar_t/12971.cc: Ditto.
	* docs/html/ext/howto.html: Add entry for DR 328.

From-SVN: r73389
2003-11-09 10:47:58 +00:00
Paolo Carlini 41d3a0c3d8 re PR libstdc++/12967 (Resolution of DR 300 [WP] still unimplemented)
2003-11-08  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12967
	* include/bits/list.tcc (merge): Implement resolution of
	DR 300 [WP].
	* docs/html/ext/howto.html: Add entry for DR 300; tweak entry
	for DR 231.

	* docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
	Import R27.

From-SVN: r73377
2003-11-08 21:17:30 +00:00
Jonathan Wakely 3ab3dca624 vec.cc: Conform to C++STYLE.
2003-11-07  Jonathan Wakely  <redi@gcc.gnu.org>

	* libsupc++/vec.cc: Conform to C++STYLE.

From-SVN: r73350
2003-11-08 00:36:13 +00:00
Carlo Wood 2d369f351f re PR libstdc++/12736 (Demangler bug)
PR libstdc++/12736
* bits/demangle.h (qualifier_list<Allocator>::decode_KVrA): Added.
(qualifier_list<Allocator>::decode_qualifiers): Collect concatenated
K, V, r and A qualifiers before processing them as a group.
* testsuite/demangle/abi_text/01.cc: Reordered CV-qualifiers.
* testsuite/demangle/regression/cw-16.cc: New.

From-SVN: r73339
2003-11-07 17:55:27 +00:00
Robert Millan b938ad89a5 configure.host: Add kfreebsd*-gnu and knetbsd*-gnu.
2003-11-07  Robert Millan  <robertmh@gnu.org>

        * configure.host: Add kfreebsd*-gnu and knetbsd*-gnu.
        * crossconfig.m4: Likewise.
        * configure: Regenerate.

From-SVN: r73337
2003-11-07 16:49:18 +00:00
Carlo Wood eb622d37cf demangle.h (qualifier_list<Allocator>::decode_qualifiers(string_type&, string_type&, bool member_function_pointer_qualifiers): Always seperate the '[' of an array type with a space from what is left of it...
* include/bits/demangle.h
(qualifier_list<Allocator>::decode_qualifiers(string_type&,
string_type&, bool member_function_pointer_qualifiers):
Always seperate the '[' of an array type with a space from
what is left of it, except when that is the closing bracket
of another array dimension.

From-SVN: r73328
2003-11-07 03:53:44 +00:00
Carlo Wood 2215f7320e demangle.h (qualifier_list<Allocator>::decode_qualifiers(string_type&, string_type&, bool) const): Made const.
* include/bits/demangle.h
(qualifier_list<Allocator>::decode_qualifiers(string_type&,
string_type&, bool) const): Made const.
(qualifier_list<Allocator>::M_printing_suppressed): Added mutable.
(_GLIBCXX_DEMANGLER_DOUT_ENTERING3, _GLIBCXX_DEMANGLER_RETURN3,
std::ostream& operator<<(std::ostream&, qualifier const&),
std::ostream& operator<<(std::ostream&, qualifier_list const&),
qualifier_list<Allocator>::decode_qualifiers(string_type&,
string_type&, bool) const,
session<Allocator>::decode_type_with_postfix(string_type&,
string_type&, qualifier_list<Allocator>*))
Added and/or changed debug-only hooks and code.

From-SVN: r73327
2003-11-07 03:49:43 +00:00
Jeffrey D. Oldham c1fab4c1be ChangeLog: Remove extraneous '>>>>'.
2003-11-04  Jeffrey D. Oldham  <oldham@codesourcery.com>

	* ChangeLog: Remove extraneous '>>>>'.

From-SVN: r73264
2003-11-05 04:38:44 +00:00
Jeffrey D. Oldham d30b600a6e vec.cc (__cxa_vec_delete2): If given a NULL pointer, immediately return.
2003-11-04  Jeffrey D. Oldham  <oldham@codesourcery.com>

	* libsupc++/vec.cc (__cxa_vec_delete2): If given a NULL pointer,
	immediately return.  This reflects a C++ ABI change 2003 Nov 03.
	(__cxa_vec_delete3): Likewise.

From-SVN: r73263
2003-11-05 04:37:03 +00:00
Petur Runolfsson 5e93f39f64 re PR libstdc++/12790 (basic_filebuf doesn't handle stateful encodings)
2003-11-03  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/12790
	* include/bits/fstream.tcc: Delete _M_last_overflowed.
	(basic_filebuf::basic_filebuf): Initialize _M_state_last.
	(basic_filebuf::open, basic_filebuf::close): Assign
	_M_state_beg to _M_state_cur and _M_state_last.
	(basic_filebuf::close): Call _M_terminate_output to handle
	unshift and flushing.
	(basic_filebuf::underflow): Assign _M_state_last, throw
	exception instead of calling abort when codecvt::max_length()
	is bad.
	(basic_filebuf::seekoff): Use _M_state_last when calling
	codecvt::length(), pass correct state to _M_seek.
	(basic_filebuf::seekpos): Pass __pos.state() to _M_seek.
	(basic_filebuf::_M_seek): Add __state_type parameter,
	set _M_state_cur correctly, store the resulting state in
	the return value and use _M_terminate_output to handle
	flushing and unshift.
	(basic_filebuf::_M_terminate_output): Flush contents of
	output buffer, if any, then call codecvt::unshift as
	needed and output the result.
	(basic_filebuf::sync): Move here, don't modify _M_writing
	or _M_reading.

	* include/std/std_fstream.h
	(basic_filebuf::_M_state_last): Declare it.
	(basic_filebuf::_M_last_overflowed): Delete.
	(basic_filebuf::_M_seek): Add __state_type parameter.
	(basic_filebuf::sync): Declare only.
	(basic_filebuf::_M_output_unshift): Delete.
	(basic_filebuf::_M_terminate_output): Declare it.

	* testsuite/testsuite_character.h:
	Define character class and state class plus char_traits and
	codecvt specializations for same for testing support for
	stateful encodings.

	* testsuite/27_io/basic_filebuf/close/12790-1.cc,
	* testsuite/27_io/basic_filebuf/close/char/12790-1.cc,
	* testsuite/27_io/basic_filebuf/close/char/12790-2.cc,
	* testsuite/27_io/basic_filebuf/close/char/12790-3.cc,
	* testsuite/27_io/basic_filebuf/close/char/12790-4.cc,
	* testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc,
	* testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc,
	* testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc,
	* testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc,
	* testsuite/27_io/basic_filebuf/open/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekoff/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekoff/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekoff/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekoff/12790-4.cc,
	* testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc,
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc,
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc,
	* testsuite/27_io/basic_filebuf/seekpos/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekpos/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekpos/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekpos/char/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc,
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc,
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc,
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc,
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-3.cc,
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc,
	* testsuite/27_io/basic_filebuf/sync/char/1.cc,
	* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc:
	New tests.

	* testsuite/27_io/basic_filebuf/3.cc,
	* testsuite/27_io/basic_filebuf/seekoff/10132-2.cc,
	* testsuite/27_io/basic_filebuf/seekpos/10132-3.cc,
	* testsuite/27_io/basic_fstream/3.cc,
	* testsuite/27_io/basic_ifstream/3.cc,
	* testsuite/27_io/basic_ofstream/3.cc:
	Use streamoff as off_type and fpos<state_type> as pos_type.

	* testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc,
	* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc:
	Check that sync does *not* set _M_writing to false.

From-SVN: r73245
2003-11-04 05:27:41 +00:00
Anthony Green 1b9e6d6484 stubs.c (sqrtf, sqrtl): Reorder so they appear before they're used.
2003-11-01  Anthony Green  <green@redhat.com>

        * libmath/stubs.c (sqrtf, sqrtl): Reorder so they appear before
        they're used.

From-SVN: r73243
2003-11-04 05:02:40 +00:00
Benjamin Kosnik e0f05105f7 locale_facets.h (time_get::_M_extract_name): Add ctype argument.
2003-11-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (time_get::_M_extract_name): Add
	ctype argument.
	* include/bits/locale_facets.tcc: Same, use it to allow
	capitalized names.

	* include/bits/fstream.tcc: Spacing tweak.
	* include/bits/istream.tcc: Same.
	* include/bits/ostream.tcc: Same.

From-SVN: r73241
2003-11-04 02:06:59 +00:00
Paolo Carlini 08b9183d62 locale_facets.tcc (time_get::_M_extract_via_format): __mod is only assigned, never used its value, remove it.
2003-10-30  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	__mod is only assigned, never used its value, remove it.

From-SVN: r73081
2003-10-30 09:03:01 +00:00