* 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-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-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-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-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-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-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 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-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-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-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-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-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 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-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-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-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-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
* 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-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 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-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-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-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-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
* 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-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-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 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
* 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-16 Danny Smith <dannysmith@users.sourceforge.net>
* testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
mkfifo for mingw32.
From-SVN: r75963
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-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-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
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-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-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-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-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 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-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: r74717
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 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 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-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-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-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-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
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-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-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: r74222
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-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-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-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 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-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