Commit Graph

205 Commits

Author SHA1 Message Date
Benjamin Kosnik ab9b9d2cf3 std_complex.h: _GLIBCXX_USE_C99_COMPLEX_MATH to _GLIBCXX_USE_C99_COMPLEX.
2005-02-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_complex.h: _GLIBCXX_USE_C99_COMPLEX_MATH to
	_GLIBCXX_USE_C99_COMPLEX.
	* acinclude.m4: Same.
	* acconfig.h: Same.
	* configure: Regenerate.
	* config.h.in: Same.

From-SVN: r95508
2005-02-24 18:55:51 +00:00
Paolo Carlini 4d73fac958 cpp_type_traits.h: Rename _M_type fields to __value...
2005-02-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/cpp_type_traits.h: Rename _M_type fields to
	__value, except for __enable_if, _M_type -> __type, consistently
	with the other traits.
	* include/bits/stl_algobase.h: Tweak consistently.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/valarray_array.h: Likewise.
	* include/c_std/std_cmath.h: Likewise.
	* include/debug/safe_iterator.h: Likewise.
	* include/std/std_complex.h: Likewise.

From-SVN: r94538
2005-02-01 13:30:34 +00:00
Mark Mitchell 9367851362 decl.c (build_enumerator): Do not issue duplicate error messages about invalid enumeration constants.
* decl.c (build_enumerator): Do not issue duplicate error messages
	about invalid enumeration constants.
	* parser.c (cp_parser_non_integral_constant_expression): Always
	set parser->non_integral_constant_expression_p.
	(cp_parser_primary_expression): Add cast_p parameter.  Issue
	errors about invalid uses of floating-point literals in
	cast-expressions.
	(cp_parser_postfix_expression): Add cast_p parameter.
	(cp_parser_open_square_expression): Pass it.
	(cp_parser_parenthesized_expression_list): Add cast_p parameter.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_new_placement): Pass it.
	(cp_parser_direct_new_declarator): Likewise.
	(cp_parser_new_initializer): Likewise.
	(cp_parser_cast_expression): Add cast_p parameter.
	(cp_parser_binary_expression): Likewise.
	(cp_parser_question_colon_clause): Likewise.
	(cp_parser_assignment_expression): Likewise.
	(cp_parser_expression): Likewise.
	(cp_parser_constant_expression): If an integral constant
	expression is invalid, return error_mark_node.
	(cp_parser_expression_statement): Pass cast_p.
	(cp_parser_condition): Likewise.
	(cp_parser_iteration_statement): Likewise.
	(cp_parser_jump_statement): Likewise.
	(cp_parser_mem_initializer): Likewise.
	(cp_parser_template_argument): Likewise.
	(cp_parser_parameter_declaration): Likewise.
	(cp_parser_initializer): Likewise.
	(cp_parser_throw_expression): Likewise.
	(cp_parser_attribute_list): Likewise.
	(cp_parser_simple_cast_expression): Likewise.
	(cp_parser_functional_cast): Likewise.
	(cp_parser_late_parsing_default_args): Likewise.
	(cp_parser_sizeof_operand): Save/restore
	non_integral_constant_expression_p.

	* include/std/std_limits.h (numeric_limits<float>::has_denorm):
	Add required cast.
	(numeric_limits<double>::has_denorm): Likewise.
	(numeric_limits<long double>::has_denorm): Likewise.

	* g++.dg/other/warning1.C: Adjust error messags.
	* g++.dg/parse/constant5.C: New test.

From-SVN: r94512
2005-02-01 01:01:34 +00:00
Paolo Carlini c0736a9ddb cpp_type_traits.h: Add types to the structs thus making type_traits.h redundant...
2005-01-31  Paolo Carlini  <pcarlini@suse.de>
	    Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* include/bits/cpp_type_traits.h: Add types to the structs thus
	making type_traits.h redundant; exploit new __truth_type and
	__traitor helpers.
	* include/bits/type_traits.h: Remove.
	* include/Makefile.am: Update.
	* include/Makefile.in: Regenerate.
	* include/backward/tempbuf.h: Include cpp_type_traits.h instead.
	* include/bits/basic_string.h (replace(iterator, iterator,
	_InputIterator, _InputIterator), _S_construct(_InIterator,
	_InIterator, const _Alloc&)): Use __is_integer instead.
	* include/bits/stl_bvector.h (vector(_InputIterator,
	_InputIterator, const allocator_type&), assign(_InputIterator,
	_InputIterator), insert(iterator, _InputIterator, _InputIterator)):
	Likewise.
	* include/bits/stl_construct.h (_Destroy(_ForwardIterator,
	_ForwardIterator)): Use __is_scalar.
	* include/bits/stl_deque.h (deque(_InputIterator, _InputIterator,
	const allocator_type&), assign(_InputIterator, _InputIterator),
	insert(iterator, _InputIterator, _InputIterator)): Use __is_integer.
	* include/bits/stl_list.h (assign(_InputIterator, _InputIterator),
	insert(iterator, _InputIterator, _InputIterator)): Likewise.
	* include/bits/stl_tempbuf.h (_Temporary_buffer(_ForwardIterator,
	_ForwardIterator)): Use __is_scalar.
	* include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator,
	_InputIterator, _ForwardIterator), uninitialized_fill(_ForwardIterator,
	_ForwardIterator, const _Tp&), uninitialized_fill_n(_ForwardIterator,
	_Size, const _Tp&)): Likewise.
	* include/bits/stl_vector.h (vector(_InputIterator, _InputIterator,
	const allocator_type&), assign(_InputIterator, _InputIterator),
	insert(iterator, _InputIterator, _InputIterator)): Use __is_integer.
	* include/debug/debug.h (__valid_range(const _InputIterator&,
	const _InputIterator&)): Use __is_integer.
	* include/ext/slist (assign(_InputIterator, _InputIterator)): Likewise.
	* include/std/std_string.h: Include cpp_type_traits.h instead.

Co-Authored-By: Gabriel Dos Reis <gdr@integrable-solutions.net>

From-SVN: r94484
2005-01-31 16:22:01 +00:00
Paolo Carlini 02a65d230f acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex to the final test for enable_c99, thus robustifying it...
2005-01-26  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex
	to the final test for enable_c99, thus robustifying it; remove
	duplicate final test on ac_99_math.
	* configure: Regenerate.

	* include/std/std_complex.h: Remove usages of the dead
	_GLIBCXX_BUGGY_COMPLEX macro.

	* testsuite/26_numerics/cmath/19322.cc: Protect with
	_GLIBCXX_USE_C99_MATH instead of the stronger _GLIBCXX_USE_C99,
	since only C99 math facilities are involved.
	* testsuite/26_numerics/cmath/c99_classification_macros_c++.cc:
	Likewise.

From-SVN: r94257
2005-01-26 10:34:53 +00:00
Benjamin Kosnik 52e6723c6c acinclude.m4 (GLIBCXX_ENABLE_C99): Test for complex math functions...
2005-01-25  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_C99): Test for complex math
	functions, and enable _GLIBCXX_USE_C99_COMPLEX_MATH if they exist.
	* acconfig.h: Add _GLIBCXX_USE_C99_COMPLEX_MATH.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/std/std_complex.h: Protect complex builtins with
	_GLIBCXX_USE_C99_COMPLEX_MATH.

From-SVN: r94221
2005-01-25 15:47:35 +00:00
Benjamin Kosnik a8e3a00f54 fstream.tcc: Remove unnecessary qualifications for uglified data members of basic_filebuf...
2005-01-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fstream.tcc: Remove unnecessary qualifications for
	uglified data members of basic_filebuf, including _M_buf,
	_M_buf_size, _M_mode, _M_pback_init.
	* include/std/std_fstream.h: Same.

From-SVN: r93006
2005-01-06 20:40:25 +00:00
Benjamin Kosnik 0aa06b18fc doxygroups.cc: Add std::tr1 namespace.
2004-11-23  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/doxygen/doxygroups.cc: Add std::tr1 namespace.
	* docs/doxygen/run_doxygen: Renames for std::tr1.
	* docs/doxygen/user.cfg.in: Add cxxabi.h.
	* include/bits/*.tcc: Add file markup.
	* include/bits/allocator.h: Add link to allocator.html.
	* include/bits/atomicity.h: Add file markup.
	* include/bits/concurrence.h: Same.
	* include/bits/functexcept.h: Same.
	* include/ext*: Adjust file markup, remove GCC3 bits.
	* include/std/*: Adjust file markup, remove bits about renamed files.
	* libsupc++/cxxabi.h: Add file markup.
	* testsuite/20_util/memory/auto_ptr/assign_neg.cc: Adjust line numbers.

From-SVN: r91135
2004-11-24 04:11:23 +00:00
Benjamin Kosnik 00aca6e83a locale_facets.h (isspace, [...]): Add doxygen markup.
2004-11-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (isspace, isprint, isupper,
	islower, isalpha, isdigit, ispunct, isxdigit, isalnum, isgraph,
	toupper, tolower): Add doxygen markup.
	(codecvt_byname, ctype_byname, numpunct_byname, collate_byname,
	time_get_byname, time_put_byname, moneypunct_byname,
	messages_byname): Same.
	* include/std/std_fstream.h: Remove superfluous markup.
	* include/std/std_sstream.h: Same.
	* include/std/std_streambuf.h: Same.
	* include/ext/enc_filebuf.h: Adjust markup.
	* include/ext/stdio_filebuf.h: Same.
	* include/ext/stdio_sync_filebuf.h: Same.
	* include/bits/codecvt.h: Same.
	* config/os/gnu-linux/ctype_base.h: Same.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.
	* include/tr1/array: Add markup.
	* include/tr1/tuple: Same.

	* docs/doxygen/run_doxygen: Print arguments.

	* docs/doxygen/user.cfg.in: Tweaks.

From-SVN: r91080
2004-11-23 09:18:41 +00:00
Jonathan Wakely 20fff8cd7c basic_string.h, [...]: Doxygen fixes.
2004-11-19  Jonathan Wakely  <redi@gcc.gnu.org>

	* include/bits/basic_string.h, include/bits/locale_classes.h,
	include/bits/valarray_after.h, include/bits/valarray_before.h,
	include/ext/stdio_sync_filebuf.h, include/std/std_algorithm.h,
	include/std/std_functional.h, include/std/std_memory.h,
	include/std/std_numeric.h: Doxygen fixes.

From-SVN: r90979
2004-11-21 13:16:24 +00:00
Paolo Carlini 14492f0b1e DR 434.
2004-11-18  Paolo Carlini  <pcarlini@suse.de>

	DR 434. bitset::to_string() hard to use [Ready]
	* include/std/std_bitset.h (to_string): Add three overloads, taking
	fewer template arguments.
	* docs/html/ext/howto.html: Add an entry for DR 434.
	* testsuite/23_containers/bitset/to_string/1.cc: New.

From-SVN: r90854
2004-11-18 09:52:57 +00:00
Paolo Carlini e9fb72e85f istream.tcc (getline(basic_istream<>&, basic_string<>&, _CharT)): Remove temporary kludge for libstdc++/15002.
2004-11-17  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (getline(basic_istream<>&, basic_string<>&,
	_CharT)): Remove temporary kludge for libstdc++/15002.
	* include/std/std_streambuf.h (class basic_streambuf): Declare
	getline(basic_istream<>&, basic_string<>&, _CharT) as friend.
	* include/bits/basic_string.h (getline(basic_istream<>&,
	basic_string<>&, _CharT)): Declare optimized specializations for
	char and wchar_t, using protected members of basic_streambuf.
	* src/istream.cc: Define the latter.

From-SVN: r90801
2004-11-17 09:04:14 +00:00
Paolo Carlini 2bf8accc31 streambuf.tcc (__copy_streambufs): Provide a generic version of the function...
2004-11-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/streambuf.tcc (__copy_streambufs): Provide
	a generic version of the function, not using the protected
	members of basic_streambuf.
	* include/std/std_streambuf.h (__copy_streambufs): Declare
	optimized specializations for char and wchar_t.
	* src/streambuf.cc: New file, define the latter.
	* src/Makefile.am: Add.
	* src/Makefile.in: Regenerate.

From-SVN: r90701
2004-11-15 23:33:05 +00:00
Paolo Carlini adb31ad60d istream.tcc (getline(char_type*, streamsize, char_type), [...]): Restore a generic version of the functions...
2004-11-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/istream.tcc (getline(char_type*, streamsize,
	char_type), ignore(streamsize), ignore(streamsize, int_type)):
	Restore a generic version of the functions, not using the
	protected members of basic_streambuf.
	* include/std/std_istream.h (getline(char_type*, streamsize,
	char_type), ignore(streamsize), ignore(streamsize, int_type)):
	Declare optimized specializations for char and wchar_t.
	* src/istream.cc: New file, define the latter.
	* src/Makefile.am: Add.
	* src/Makefile.in: Regenerate.

From-SVN: r90268
2004-11-08 15:46:28 +00:00
Benjamin Kosnik 6309eefc3d re PR libstdc++/17218 (unknown subjects in generated libstdc++ manpages)
2004-11-05  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/17218
	PR libstdc++/17223
	* docs/doxygen/filter: Remove.
	* docs/doxygen/filter.sed: Remove.
	* docs/doxygen/mainpage.html: Add link to functions.
	* docs/doxygen/run_doxygen: Changes due to new source filtering.
	* docs/doxygen/user.cfg.in: Update to doxygen 1.3.9.1, tweak.
	* include/bits/allocator.h: Tweaks for doxygen.
	* include/bits/char_traits.h: Same.
	* include/bits/codecvt.h: Same.
	* include/bits/concurrence.h: Same.
	* include/bits/locale_facets.h: Same.
	* include/ext/array_allocator.h: Same.
	* include/ext/debug_allocator.h: Same.
	* include/ext/malloc_allocator.h: Same.
	* include/ext/mt_allocator.h: Same.
	* include/ext/new_allocator.h: Same.
	* include/ext/pool_allocator.h: Same.
	* include/ext/stdio_sync_filebuf.h: Same.
	* include/std/std_memory.h: Same.
	* include/tr1/array: Same.
	* include/tr1/tuple: Same.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.
	* config/os/gnu-linux/ctype_base.h: Same.

From-SVN: r90137
2004-11-05 19:58:03 +00:00
Paolo Carlini dafa8871d1 std_memory.h (__get_temporary_buffer): Don't use INT_MAX...
2004-10-09  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_memory.h (__get_temporary_buffer): Don't use
	INT_MAX, prefer numeric_limits<ptrdiff_t>::max(), ok on 64-bit
	platforms too.
	* testsuite/20_util/memory/auto_ptr/assign_neg.cc: Adjust dg-error
	line numbers.

From-SVN: r88814
2004-10-09 08:23:02 +00:00
Paolo Carlini dbb8bfe8c5 [multiple changes]
2004-10-06  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_sstream.h (_M_sync): When the caller is
	setbuf, don't trust _M_string.capacity() to be the size of
	the buffer area, use _M_string.size() in this case.
	* testsuite/27_io/basic_stringbuf/setbuf/char/4.cc: New.
	* testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc: Likewise.

	* include/bits/sstream.tcc (overflow): Avoid calling string::assign
	unnecessarily when the current _M_string is empty.

2004-10-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h (__reverse(bidirectional_iterator_tag)):
	Avoid iterator postincrement.
	(__rotate): Likewise.

	* include/bits/stl_algo.h: Minor formatting tweaks.

2004-10-06  Christopher Jefferson <caj@cs.york.ac.uk>

	* include/bits/stl_algo.h (__reverse(random_access_iterator_tag)):
	Avoid iterator postincrement; fix swapping middle element with
	itself on odd-length inputs.

From-SVN: r88593
2004-10-06 09:06:59 +00:00
Paolo Carlini f67b6b7a9e sstream.tcc (seekpos): Minor rearrangement of two conditionals consistently with seekoff.
2004-10-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/sstream.tcc (seekpos): Minor rearrangement of two
	conditionals consistently with seekoff.
	* include/std/std_sstream.h (setbuf): Avoid a string temporary.
	(_M_sync): Simplify a bit, clean-up comment.

From-SVN: r88389
2004-10-01 09:22:49 +00:00
Paolo Carlini 983de0da66 std_sstream.h (basic_stringbuf(ios_base::openmode)): Don't use _M_stringbuf_init, keep the pointers null, per 27.7.1.1.
2004-09-29  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_sstream.h (basic_stringbuf(ios_base::openmode)):
	Don't use _M_stringbuf_init, keep the pointers null, per 27.7.1.1.
	(str()): Slightly tweak, protect from pptr() == 0.
	(_M_update_egptr()): Likewise.
	* include/bits/sstream.tcc (ssekoff, seekpos): In order to check
	for an empty buffer use __beg instead of _M_string.capacity().
	* testsuite/27_io/basic_stringbuf/cons/char/1.cc: New.
	* testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.

	* testsuite/27_io/basic_filebuf/cons/char/1.cc: New.
	* testsuite/27_io/basic_filebuf/cons/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_streambuf/cons/char/1.cc: Update.
	* testsuite/27_io/basic_streambuf/cons/wchar_t/1.cc: Likewise.

2004-09-29  Paolo Carlini  <pcarlini@suse.de>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_io.h (class constraint_buf): New, extended
	and templatized version of constraint_filebuf; add typedefs for
	streambuf/stringbuf/filebuf and wchar_t counterparts.

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

From-SVN: r88307
2004-09-29 21:14:43 +00:00
Paolo Carlini c56e3d82fc re PR libstdc++/11722 ([3.4 only] Unbuffered filebuf::sgetn is slow)
2004-09-13  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11722
	* include/std/std_fstream.h (xsgetn): Declare only.
	* include/bits/fstream.tcc (xsgetn): Define, optimize for the
	always_noconv() case: when __n > __buflen, copy the available
	buffer and issue a direct read.
	* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: New.

	* include/bits/fstream.tcc (xsputn): Minor tweak, reorder a
	conditional.

From-SVN: r87453
2004-09-13 22:21:34 +00:00
Paolo Carlini 85a5f64e9f std_fstream.h (class basic_ifstream, [...]): Add const overloads of is_open, as per DR 365 [WP].
2004-08-13  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_fstream.h (class basic_ifstream,
	class basic_ofstream, class basic_fstream): Add const overloads
	of is_open, as per DR 365 [WP].
	* docs/html/ext/howto.html: Add an entry for DR 365.

From-SVN: r85948
2004-08-13 16:47:43 +00:00
Paolo Carlini b714a4192e gslice.h: Trivial formatting fixes.
2004-07-08  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/gslice.h: Trivial formatting fixes.
	* include/bits/gslice_array.h: Likewise.
	* include/bits/indirect_array.h: Likewise.
	* include/bits/mask_array.h: Likewise.
	* include/bits/slice_array.h: Likewise.
	* include/bits/valarray_after.h: Likewise.
	* include/bits/valarray_array.h: Likewise.
	* include/bits/valarray_before.h: Likewise.
	* include/std/std_valarray.h: Likewise.

From-SVN: r84312
2004-07-08 20:48:04 +00:00
Paolo Carlini 80dddedcaf std_istream.h (ignore(streamsize __n = 1, int_type __delim = traits_type::eof())): Split into...
2004-06-22  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_istream.h (ignore(streamsize __n = 1,
	int_type __delim = traits_type::eof())): Split into...
	(ignore(), ignore(streamsize __n), ignore(streamsize __n,
	int_type __delim)): The first two can be much more simpler
	and efficient than the fully general case; also, the last
	two can take advantage of the same mechanism already used
	for getline.
	* include/bits/istream.tcc (ignore(streamsize __n = 1,
	int_type __delim = traits_type::eof()): Remove.
	(ignore(), ignore(streamsize __n), ignore(streamsize __n,
	int_type __delim)): New.

From-SVN: r83486
2004-06-22 10:06:39 +00:00
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
Gabriel Dos Reis b53dcf3e5c * include/std/std_complex.h (log): Tidy.
From-SVN: r82584
2004-06-02 21:04:07 +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
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
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 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 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 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
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
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
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
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
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
Jerry Quinn ffcec5c832 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: r76688
2004-01-27 02:58:06 +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
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 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 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
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
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
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
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
Benjamin Kosnik 4c4809c175 [multiple changes]
2003-10-16  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/8610
	PR libstdc++/11450
	PR libstdc++/11543
	PR libstdc++/12065
	* config/io/basic_file_stdio.cc (__basic_file::seekoff):
	Change return value from streampos to streamoff.
	(__basic_file::seekpos): Delete.
	* config/io/basic_file_stdio.h: Same.
	* config/io/c_io_stdio.h: Remove streamoff and wstreamsize typedefs.
	* include/Makefile.am (bits_headers): Add bits/postypes.h.
	* include/bits/char_traits.h: Include bits/postypes.h instead of
	bits/fpos.h.
	* include/bits/fstream.tcc (basic_filebuf::open,
	basic_filebuf::pbackfail): Don't use < or >= to compare pos_type
	values, use == and != instead.
	(basic_filebuf::_M_seek): Use explicit conversion from streamoff
	to pos_type.
	(basic_filebuf::imbue):  Don't use ! on pos_type values, use
	== instead. Don't use __check_facet(_M_codecvt) unless is_open().
	* include/bits/postypes.h: New file.
	Add __streamoff_base_type typedef, streamsize.
	(streamoff, streampos, wstreampos): Define typedefs, with
	streamoff defined as...
	(streamoff): New class. Document implementation defined
	aspects.
	(fpos): New implementation. Document implementation defined
	aspects.
	* include/bits/sstream.tcc (basic_stringbuf::seekpos): Use
	explicit conversion from pos_type to off_type.
	* include/std/std_iosfwd.h: Include bits/postypes.h instead
	of bits/fpos.h.
	* testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: New test.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: New test.
	* testsuite/27_io/fpos/11450.cc: New test.
	* testsuite/27_io/fpos/mbstate_t/12065.cc: New test.
	* testsuite/27_io/fpos/mbstate_t/4_neg.cc: New test.
	* testsuite/27_io/types/3.cc: New test.

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

        * configure.host: Remove fpos_include_dir.
        * configure.ac: Remove FPOS_INC_SRCDIR.
        * configure: Regenerate.
        * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Remove FPOS_H.
        * aclocal.m4: Regenerate.
        * include/Makefile.am (host_headers): Remove fpos.h.
        (bits_headers): Add postypes.h.
        * include/Makefile.in: Regenerate.
        * config/os/gnu-linux/fposh: Remove.
        * config/os/generic/fpos.h: Remove.

        * testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Fixup.
        * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Same.
        * testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Same.
        * testsuite/27_io/basic_istream/seekg/char/2.cc: Same.
        * testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Same.
        * testsuite/27_io/basic_stringbuf/seekpos/char/1.cc: Same.
        * testsuite/27_io/fpos/mbstate_t/3.cc: Same.
        * testsuite/27_io/objects/char/10.cc: Same.

From-SVN: r72582
2003-10-16 22:37:53 +00:00
Paolo Carlini f5677b1560 codecvt_specializations.h: Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
2003-10-12  Paolo Carlini  <pcarlini@unitus.it>

	* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
	Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
	* include/bits/basic_string.tcc: Likewise.
	* include/bits/ios_base.h: Likewise.
	* include/bits/istream.tcc: Likewise.
	* include/bits/locale_facets.tcc: Likewise.
	* include/bits/ostream.tcc: Likewise.
	* include/bits/stl_function.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_pair.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/streambuf_iterator.h
	* include/std/std_iosfwd.h: Likewise.
	* include/std/std_istream.h: Likewise.
	* include/std/std_sstream.h: Likewise.
	* include/std/std_streambuf.h: Likewise.
	* src/ios.cc: Likewise.
	* include/bits/c++config:
	Comment out #define _GLIBCXX_RESOLVE_LIB_DEFECTS 1.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak a
	dg-error directive due to removal of a blank line.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.

From-SVN: r72392
2003-10-12 10:12:09 +00:00
Petur Runolfsson 1a139c5924 re PR libstdc++/9874 (filebuf::seekpos fails if codecvt::encoding() <= 0)
2003-10-09  Petur Runolfsson  <peturr02@ru.is>

        PR libstdc++/9874
        * include/bits/fstream.tcc (basic_filebuf::seekoff):
        Move code needed for both seekoff and seekpos...
        (basic_filebuf::_M_seek): ...here. New function.
        (basic_filebuf::seekpos): Don't call seekoff, call _M_seek.
        * include/std/std_fstream.h (basic_filebuf::_M_seek): Declare it.
        * testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: New test.

        * testsuite/22_locale/locale/cons/12438.cc: Increase memory limit.

From-SVN: r72268
2003-10-09 16:11:40 +00:00