Commit Graph

2098 Commits

Author SHA1 Message Date
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
Paolo Carlini f1e7988ac1 locale_facets.tcc (time_get::do_get_year): Absolutely avoid dereferencing end iterators.
2003-10-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::do_get_year):
	Absolutely avoid dereferencing end iterators.
	(time_put::put): Minor clean up.

	* include/bits/locale_facets.tcc: Cosmetic reformattings.

From-SVN: r73049
2003-10-29 16:20:34 +00:00
Paolo Carlini 58c9703fe3 locale_facets.tcc (num_get::_M_extract_float): Revert the last commit, is incorrect, sorry.
2003-10-29  Paolo Carlini  <pcarlini@suse.de>

        * include/bits/locale_facets.tcc (num_get::_M_extract_float):
	Revert the last commit, is incorrect, sorry.

From-SVN: r73042
2003-10-29 15:02:40 +00:00
Paolo Carlini 4f36323260 c_locale.cc: Add back <cmath> and <cstdlib>.
2003-10-29  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/generic/c_locale.cc: Add back <cmath>
	and <cstdlib>.

	* include/bits/locale_facets.tcc
	(num_get::_M_extract_float): Clean up.

From-SVN: r73036
2003-10-29 13:34:04 +00:00
Paolo Carlini 6bf0b59cbf locale_facets.tcc (time_put::put): Absolutely avoid dereferencing end iterators; clean up.
2003-10-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_put::put): Absolutely
	avoid dereferencing end iterators; clean up.

	* include/bits/locale_facets.tcc (num_get::_M_extract_float,
	num_get::_M_extract_int): Minor tweak.

From-SVN: r73035
2003-10-29 12:21:58 +00:00
Paolo Carlini c9cca2c22c locale_facets.tcc: Remove some unnecessary includes.
2003-10-29  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc: Remove some unnecessary
	includes.
	* config/locale/generic/c_locale.cc: Include <cerrno> here.
	* config/locale/gnu/c_locale.cc: Likewise.

From-SVN: r73030
2003-10-29 10:08:05 +00:00
Paolo Carlini 157f3283d6 2003-10-28 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc
	(money_get<>::do_get(..., string_type&)): Absolutely avoid
	dereferencing end iterators; general clean up.

From-SVN: r73011
2003-10-28 17:09:03 +00:00
Paolo Carlini cc27f5a21c locale_facets.tcc (time_get::_M_extract_num): Absolutely avoid dereferencing end iterators.
2003-10-28  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (time_get::_M_extract_num):
	Absolutely avoid dereferencing end iterators.
	(time_get::_M_extract_name): Likewise.

	* include/bits/locale_facets.tcc
	(time_get::_M_extract_via_format, case 'e'): Don't try to
	be smart wrt returning the right __beg in case of parse
	error, time_get::_M_extract_num must be fixed instead.

From-SVN: r73004
2003-10-28 12:23:31 +00:00
Paolo Carlini 0c6b814ac9 re PR libstdc++/12778 (1022 bootstrap failure building libstdc++-v3/src/basic_file.cc)
2003-10-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12778
	* acinclude.m4 (GLIBCXX_CHECK_LFS): Use the C++ compiler.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r72994
2003-10-27 23:11:52 +00:00
Benjamin Kosnik 0f09879bd2 TODO: Add links.
2003-10-27  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/17_intro/TODO: Add links.
	* testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
	Uncomment.

From-SVN: r72991
2003-10-27 21:43:33 +00:00
Paolo Carlini f20d2b7871 re PR libstdc++/12750 (time_get::_M_extract_via_format doesn't deal with 'e')
2003-10-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12750
	* include/bits/locale_facets.tcc
	(time_get::_M_extract_via_format): Deal with code 'e'.
	* testsuite/22_locale/time_get/get_date/char/12750.cc: New.
	* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Ditto.

	* include/bits/locale_facets.tcc
	(time_get::_M_extract_via_format): Tweak to absolutely avoid
	dereferencing end iterators.

	* include/bits/locale_facets.h (__verify_grouping):
	Const-ify second parameter.
	* include/bits/locale_facets.tcc (__verify_grouping): Ditto.
	* src/locale-inst.cc (__verify_grouping): Ditto.

2003-10-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_float):
	Various things: 1- Avoid absolutely end iterator dereferences;
	2- Improve performance-wise the code skipping leading zeros;
	3- Fix two bugs wrt early bail out in case of parsing errors
	(see testcases); 4- General clean up.
	(num_get::_M_extract_int): Likewise, except 3-. Additionally,
	use __builtin_expect to favor base 10 inputs.
	* testsuite/22_locale/num_get/get/char/7.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/7.cc: Ditto.

From-SVN: r72987
2003-10-27 16:21:14 +00:00
Paolo Carlini f883c8dce3 1.cc: Clean up.
2003-10-26  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_put/put/char/1.cc: Clean up.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Ditto.

From-SVN: r72949
2003-10-26 10:33:30 +00:00