Benjamin Kosnik
656cee9aa2
re PR libstdc++/17627 (M68060 fails with libstdc++-v3/config/cpu/m68k/atomicity.h)
...
2004-11-02 Benjamin Kosnik <bkoz@redhat.com>
Lothar Werzinger <lothar@xcerla.com>
PR libstdc++/17627
* src/debug.cc: Include concurrence, use mutexes.
(_Safe_iterator_base::_M_attach): Here.
(_Safe_iterator_base::_M_detach): Here.
Co-Authored-By: Lothar Werzinger <lothar@xcerla.com>
From-SVN: r90004
2004-11-02 23:56:56 +00:00
Benjamin Kosnik
bd80bd9b93
re PR libstdc++/17922 (Spurious warnings about std::ios_base::seekdir)
...
2004-11-02 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/17922
* include/bits/ios_base.h : Add enum values.
* testsuite/testsuite_hooks.h (bitmask_operators): Add function.
* testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc: New.
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: New.
* testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc: New.
* testsuite/27_io/ios_base/types/iostate/case_label.cc: New.
* testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc: New.
* testsuite/27_io/ios_base/types/openmode/case_label.cc: New.
* testsuite/27_io/ios_base/types/seekdir/case_label.cc: New.
* config/io/c_io_stdio.h (__ios_flags): Mark deprecated.
* src/ios.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
From-SVN: r89996
2004-11-02 19:00:19 +00:00
Momchil Velikov
c137586a8e
re PR libstdc++/18185 ([3.4 only] Unhandled exceptions leak)
...
2004-11-01 Momchil Velikov <velco@fadata.bg>
PR libstdc++/18185
* libsupc++/eh_globals.cc (get_globals_dtor): Delete unhandled
exceptions.
* testsuite/thread/18185.cc: New.
From-SVN: r89962
2004-11-01 22:47:33 +00:00
Chris Jefferson
d68e653fae
re PR libstdc++/18159 (tr1/tuple is broken on darwin)
...
2004-11-01 Chris Jefferson <chris@bubblescope.net>
PR libstdc++/18159
* include/tr1/tuple (get(pair)): Change occurrences of _I to _Int.
(get(const pair)): Likewise.
From-SVN: r89944
2004-11-01 17:53:24 +00:00
Paolo Carlini
8dc5fa3267
locale_facets.tcc (num_get<>::_M_extract_float): Evaluate *__beg the exact strict minimum number of times...
...
2004-11-01 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
Evaluate *__beg the exact strict minimum number of times; likewise
for __beg != __end; in the main parsing loop, call ++__beg in two
places only. The former is also a correctness issue, because,
according to the standard (22.2.2.1.2, Stage 2), 'in' shall be
dereferenced only one time for each increment.
From-SVN: r89940
2004-11-01 11:31:44 +00:00
Benjamin Kosnik
8d511b9097
re PR tree-optimization/16728 (std::set tests for allocator/insert core in make check-performance)
...
2004-10-31 Benjamin Kosnik <bkoz@redhat.com>
PR c++/16728
* testsuite/23_containers/set/modifiers/16728.cc: New.
From-SVN: r89921
2004-11-01 00:02:42 +00:00
Paolo Carlini
de2d7877ba
bitmap_allocator.h (allocate(size_type)): Minor tweak.
...
2004-10-30 Paolo Carlini <pcarlini@suse.de>
* include/ext/bitmap_allocator.h (allocate(size_type)): Minor tweak.
* testsuite/ext/bitmap_allocator/check_delete.cc: New.
* testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
From-SVN: r89899
2004-10-30 21:44:04 +00:00
Geoffrey Keating
f9686024ee
configure.host (darwin*): Set os_include_dir to a separate directory for Darwin.
...
* configure.host (darwin*): Set os_include_dir to a separate directory
for Darwin.
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Add a new C locale kind,
'darwin'.
* config/locale/darwin/ctype_members.cc: New.
* config/os/bsd/darwin/ctype_base.h: New.
* config/os/bsd/darwin/ctype_inline.h: New.
* config/os/bsd/darwin/ctype_noninline.h: New.
* config/os/bsd/darwin/os_defines.h: New.
From-SVN: r89874
2004-10-30 01:03:12 +00:00
Geoffrey Keating
8b5a12daa0
12658_thread-1.cc: Only xfail on Linux.
...
* testsuite/22_locale/locale/cons/12658_thread-1.cc: Only xfail
on Linux.
From-SVN: r89872
2004-10-30 00:54:22 +00:00
Chris Jefferson
158414d635
stl_algo.h (find_first_of(,,,,pred)): Remove invalid EqualOpConcept.
...
2004-10-29 Chris Jefferson <chris@bubblescope.net>
* include/bit/stl_algo.h (find_first_of(,,,,pred)):
Remove invalid EqualOpConcept.
* testsuite/25_algorithms/find_first_of/concept_check_1.cc: New.
From-SVN: r89853
2004-10-29 21:44:55 +00:00
Benjamin Kosnik
a53f986f91
testsuite_allocator.h (check_delete): New.
...
2004-10-29 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/testsuite_allocator.h (check_delete): New.
(check_new): Simplify.
* testsuite/ext/array_allocator/check_delete.cc: New.
* testsuite/ext/array_allocator/check_new.cc: Simplify.
* testsuite/ext/debug_allocator/check_delete.cc: New.
* testsuite/ext/debug_allocator/check_new.cc: Simplify.
* testsuite/ext/malloc_allocator/check_delete.cc: New.
* testsuite/ext/malloc_allocator/check_new.cc: Simplify.
* testsuite/ext/mt_allocator/check_delete.cc: New.
* testsuite/ext/mt_allocator/check_new.cc: Simplify.
* testsuite/ext/new_allocator/check_delete.cc: New.
* testsuite/ext/new_allocator/check_new.cc: Simplify.
* testsuite/ext/pool_allocator/check_delete.cc: New.
* testsuite/ext/pool_allocator/check_new.cc: Simplify.
From-SVN: r89850
2004-10-29 21:03:07 +00:00
Chris Jefferson
a30036b2fd
re PR libstdc++/18159 (tr1/tuple is broken on darwin)
...
2004-10-28 Chris Jefferson <chris@bubblescope.net>
PR libstdc++/18159
* include/tr1/tuple: Fix, change formatting.
From-SVN: r89782
2004-10-28 21:18:56 +00:00
Benjamin Kosnik
6571df13b4
mt_allocator.h (__common_pool_policy): Add template template parameter for pool class type.
...
2004-10-28 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h (__common_pool_policy): Add template
template parameter for pool class type.
(__per_type_pool_policy): Same.
(__mt_allocator): Don't inherit policy. Qualify policy_type calls.
* testsuite/ext/mt_allocator/check_deallocate_null.cc: Fix.
* testsuite/ext/mt_allocator/check_deallocate_null_thread.cc: Same.
* testsuite/ext/mt_allocator/deallocate_global-2.cc: Same.
* testsuite/ext/mt_allocator/deallocate_global-4.cc: Same.
* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same.
* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same.
* testsuite/ext/mt_allocator/deallocate_local-2.cc: Same.
* testsuite/ext/mt_allocator/deallocate_local-4.cc: Same.
* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Same.
* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same.
* testsuite/ext/mt_allocator/instantiate.cc: Same.
* testsuite/ext/mt_allocator/tune-1.cc: Same.
* testsuite/ext/mt_allocator/tune-2.cc: Same.
* testsuite/ext/mt_allocator/tune-3.cc: Same.
* testsuite/ext/mt_allocator/tune-4.cc: Same.
From-SVN: r89776
2004-10-28 20:46:08 +00:00
Paolo Carlini
53a8d0f021
locale_facets.tcc (num_get<>::_M_extract_float): Cache *__beg in __c when parsing exponent sign too.
...
2004-10-28 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
Cache *__beg in __c when parsing exponent sign too.
(num_get<>::do_get(..., bool&)): Cache *__beg.
(money_get<>::_M_extract)): Likewise, in money_base::value.
From-SVN: r89753
2004-10-28 12:47:36 +00:00
Paolo Carlini
5536e07dad
basic_string.h (assign(const basic_string&)): Move out of line...
...
2004-10-27 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (assign(const basic_string&)):
Move out of line...
* include/bits/basic_string.tcc: ... here.
From-SVN: r89726
2004-10-28 01:04:35 +00:00
Geoffrey Keating
95b0de03a2
Add missing ChangeLog line for configure.host change.
...
From-SVN: r89696
2004-10-27 18:09:48 +00:00
Paolo Carlini
6bfad5e135
basic_string.h (_M_replace_aux, [...]): Move out of line...
...
2004-10-27 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
Move out of line...
* include/bits/basic_string.tcc: ... here.
From-SVN: r89637
2004-10-27 12:02:37 +00:00
Paolo Carlini
ab4375af84
basic_string.h (append(const basic_string&), [...]): Move out of line...
...
2004-10-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (append(const basic_string&),
append(size_type, _CharT)): Move out of line...
* include/bits/basic_string.tcc: ... here.
From-SVN: r89622
2004-10-27 01:02:47 +00:00
Paolo Carlini
a6cb7068eb
basic_string.h (erase(size_type, size_type), [...]): Call _M_mutate instead of _M_replace_safe...
...
2004-10-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (erase(size_type, size_type),
erase(iterator), erase(iterator, iterator)): Call _M_mutate
instead of _M_replace_safe, equivalent when the fourth argument
is zero and simpler.
From-SVN: r89608
2004-10-26 21:16:58 +00:00
Benjamin Kosnik
210d7a8f70
array_allocator.h (array::allocate): Check for valid array object, use its size member function directly.
...
2004-10-26 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/array_allocator.h (array::allocate): Check for valid
array object, use its size member function directly.
* testsuite/ext/array_allocator/3.cc: New.
* docs/html/20_util/allocator.html: Add docs.
From-SVN: r89573
2004-10-26 06:37:10 +00:00
Geoffrey Keating
f1a6626519
Index: gcc/gcc/ChangeLog
...
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (LINK_SPEC): Default weak_reference_mismatches
to 'non-weak'.
(MAKE_DECL_ONE_ONLY): Set DECL_WEAK.
(ASM_MAKE_LABEL_LINKONCE): Delete.
(ASM_WEAKEN_DECL): New.
(ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY.
(ASM_DECLARE_FUNCTION_NAME): Likewise.
(TEXT_SECTION_ASM_OP): Add a tab.
(DATA_SECTION_ASM_OP): Likewise.
(SECTION_FUNCTION): Add a tab. Use fputs. Don't call
data_section on every section change.
(EXTRA_SECTIONS): Add a bunch of new extra sections.
(EXTRA_SECTION_FUNCTIONS): Likewise.
(USE_SELECT_SECTION_FOR_FUNCTIONS): Define.
(JCR_SECTION_NAME): Define.
(TARGET_SECTION_TYPE_FLAGS): Don't define.
* config/darwin.c (darwin_encode_section_info): A symbol is defined
in this file if it is not weak.
(textcoal_section): Delete.
(datacoal_section): Delete.
(darwin_make_decl_one_only): Delete.
(machopic_select_section): Handle functions.
(darwin_asm_named_section): Add a tab.
(darwin_section_type_flags): Delete.
(darwin_unique_section): Delete contents.
(darwin_emit_unwind_label): Add a tab. Make decls weak if
DECL_WEAK is set.
* config/darwin-protos.h (darwin_section_type_flags): Delete.
(darwin_make_decl_one_only): Delete.
(text_coal_section): New.
(text_unlikely_section): New.
(text_unlikely_coal_section): New.
(const_coal_section): New.
(data_coal_section): New.
(const_data_coal_section): New.
* varasm.c (function_section): Honour
USE_SELECT_SECTION_FOR_FUNCTIONS.
* dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when
TARGET_USES_WEAK_UNWIND_INFO is in effect.
* dbxout.c (dbxout_source_file): Don't change sections while
a function is being output.
Index: gcc/testsuite/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* objc.dg/image-info.m: Update for changes to section selection.
Index: libjava/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* Makefile.am (DARWIN_CRT_SRC): New.
(libgcj_la_SOURCES): Use it.
* configure.ac: Define USING_DARWIN_CRT when on Darwin.
* darwin.cc: New file.
* include/jvm.h (_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New prototype.
* java/lang/Class.h: Include stddef.h.
(_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New prototype.
(Object): Make '_Jv_RegisterClasses_Counted' a friend.
* java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify.
(_Jv_RegisterClasses_Counted): New function.
* configure: Regenerate.
* Makefile.in: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
Index: libstdc++-v3/ChangeLog
2004-10-25 Geoffrey Keating <geoffk@apple.com>
* libsupc++/new_op.cc (new): Make weak.
* libsupc++/new_opnt.cc (new): Make weak.
* libsupc++/new_opv.cc (new): Make weak.
* libsupc++/new_opvnt.cc (new): Make weak.
* libsupc++/delete_op.cc (delete): Make weak.
* libsupc++/delete_opnt.cc (delete): Make weak.
* libsupc++/delete_opv.cc (delete): Make weak.
* libsupc++/delete_opvnt.cc (delete): Make weak.
From-SVN: r89572
2004-10-26 06:09:05 +00:00
Benjamin Kosnik
7c8bf027bc
Makefile.am (GLIBCXX_INCLUDES): Add.
...
2004-10-25 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/Makefile.am (GLIBCXX_INCLUDES): Add.
(AUTOMAKE_OPTIONS): Add nostdinc.
* testsuite/Makefile.in: Regenerate.
* scripts/testsuite_flags.in (build-includes): Remove redundant
search for libsupc++.
* fragment.am: Clean.
From-SVN: r89550
2004-10-25 20:32:40 +00:00
Benjamin Kosnik
a520f0b0ae
[multiple changes]
...
2004-10-25 Benjamin Kosnik <bkoz@redhat.com>
* include/Makefile.am (tr1_headers): Add tuple.
* include/Makefile.in: Regenerate.
2004-10-25 Chris Jefferson <chris@bubblescope.net>
* include/tr1/tuple: Implementation of tuple from library TR.
* testsuite/tr1/6_containers/tuple/tuple_element.cc: New.
* testsuite/tr1/6_containers/tuple/tuple_size.cc: New.
* testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc:
New.
* testsuite/tr1/6_containers/tuple/cons/assignment.cc: New.
* testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: New.
* testsuite/tr1/6_containers/tuple/cons/constructor.cc: New.
* testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
New.
* testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: New.
* testsuite/tr1/6_containers/tuple/element_access/get.cc: New.
From-SVN: r89548
2004-10-25 19:05:58 +00:00
Paolo Carlini
8eae76be5f
basic_string.h (_Rep::_M_is_safe): Move to basic_string as _M_disjunct, adjust to take only __s.
...
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_Rep::_M_is_safe): Move to
basic_string as _M_disjunct, adjust to take only __s.
* include/bits/basic_string.tcc: Adjust consistently callers.
From-SVN: r89534
2004-10-25 15:16:49 +00:00
Paolo Carlini
d87bdb1330
basic_string.tcc (assign(const _CharT*, size_type)): Adjust bit missing from the previous commit.
...
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
Adjust bit missing from the previous commit.
From-SVN: r89532
2004-10-25 10:43:59 +00:00
Eric Botcazou
1e02510f05
re PR other/18138 (libgcc_s.so.1 not found by 64-bit testsuite)
...
gcc/testsuite:
PR other/18138
* lib/g++.exp: Accept more than one multilib libgcc.
* lib/gcc-dg.exp: Likewise.
* lib/objc.exp: Likewise.
* lib/treelang.exp: Likewise.
* lib/gfortran.exp: Likewise.
libffi:
PR other/18138
* testsuite/lib/libffi-dg.exp: Accept more than one multilib
libgcc.
libjava:
PR other/18138
* testsuite/lib/libjava.exp: Accept more than one multilib
libgcc.
libmudflap!:
PR other/18138
* testsuite/lib/libmudflap.exp: Accept more than one multilib
libgcc.
libstdc++-v3:
PR other/18138
* testsuite/lib/libstdc++.exp: Accept more than one multilib
libgcc.
From-SVN: r89528
2004-10-25 09:01:15 +00:00
Paolo Carlini
ec61e852bc
basic_string.h (_Rep::_M_is_safe, [...]): New, use througout.
...
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_Rep::_M_is_safe, _M_check_length,
_M_move, _M_copy, _M_assign): New, use througout.
(operator+=(_CharT)): Define in terms of push_back.
(append(const basic_string&)): Define here, inline, and simplify,
don't use the full _M_replace_safe.
(append(size_type, _CharT)): Likewise, don't use _M_replace_aux.
(push_back): Likewise.
(assign(const basic_string&)): Define here, inline.
* include/bits/basic_string.tcc (append(const _CharT* s, size_type):
Fix: when s points inside the _Rep, upon reallocation (reserve) we
were copying from deallocated memory.
(append(const basic_string&, size_type, size_type)): Simplify,
don't use _M_replace_safe.
(replace(size_type, size_type, const _CharT*, size_type)): Slightly
tweak.
(reserve): Likewise.
* testsuite/21_strings/basic_string/append/char/2.cc: New.
* testsuite/21_strings/basic_string/append/char/3.cc: Likewise.
* testsuite/21_strings/basic_string/append/wchar_t/2.cc: Likewise.
* testsuite/21_strings/basic_string/append/wchar_t/3.cc: Likewise.
* testsuite/21_strings/basic_string/assign/char/3.cc: Remove junk.
* testsuite/21_strings/basic_string/assign/wchar_t/3.cc: Likewise.
From-SVN: r89526
2004-10-25 08:45:04 +00:00
Andrew Pinski
ed3eaab807
deallocate_global-2.c: s/value_t/value_type/.
...
2004-10-23 Andrew Pinski <pinskia@physics.uc.edu>
* testsuite/ext/mt_allocator/deallocate_global-2.c:
s/value_t/value_type/. s/traits_t/traits_type/.
s/policy_t/policy_type/. s/allocator_t/allocator_type/.
s/string_t/string_type/. s/list_t/list_type/.
* testsuite/ext/mt_allocator/deallocate_global-4.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_local-2.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_local-4.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Likewise.
* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Likewise.
From-SVN: r89493
2004-10-23 12:41:06 -07:00
Benjamin Kosnik
aed305a929
array (array): Make safe for zero-sized arrays.
...
2004-10-21 Benjamin Kosnik <bkoz@redhat.com>
* include/tr1/array (array): Make safe for zero-sized arrays.
(array::end): Return one past the end.
(array::at): Use __throw_out_of_range, include functexcept.h.
(operator==): Implement.
(operator!=): Same.
(operator<): Same.
(operator>): Same.
(operator>=): Same.
(operator<=): Same.
* testsuite/tr1/6_containers/array/capacity/(empty.cc,
max_size.cc, size.cc): New.
* testsuite/tr1/6_containers/array/comparison_operators/(equal.cc,
greater.cc, greater_or_equal.cc, less.cc, less_or_equal.cc,
not_equal): New.
* testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc:
New.
* testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc:
New.
* testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc: New.
* testsuite/tr1/6_containers/array/requirements/(contiguous.cc,
instantiate, typedefs, zero_size_arrays): New.
From-SVN: r89429
2004-10-22 05:32:16 +00:00
Paolo Carlini
cbf52bfab3
basic_string.h (_M_set_length_and_sharable): New.
...
2004-10-21 Paolo Carlini <pcarlini@suse.de>
Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_string.h (_M_set_length_and_sharable): New.
* include/bits/basic_string.tcc (_S_construct, assign(const _CharT*,
size_type), _M_mutate, _M_clone): Use it.
(_Rep::_S_create): Don't set/call _M_length/_M_set_sharable here.
Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>
From-SVN: r89415
2004-10-21 22:01:41 +00:00
Paolo Carlini
996e539545
vector.tcc (_M_insert_aux, [...]): Check at the outset that we are not trying to exceed max_size...
...
2004-10-21 Paolo Carlini <pcarlini@suse.de>
Dhruv Matani <dhruvbird@gmx.net>
Nathan Myers <ncm@cantrip.org>
* include/bits/vector.tcc (_M_insert_aux, _M_fill_insert,
_M_range_insert): Check at the outset that we are not trying
to exceed max_size, then deal properly with __len overflows.
* testsuite/23_containers/vector/modifiers/insert/1.cc: New.
* testsuite/testsuite_allocator.h: Remove redundant include.
Co-Authored-By: Dhruv Matani <dhruvbird@gmx.net>
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r89377
2004-10-21 14:53:02 +00:00
Paolo Carlini
a063e891bd
bitmap_allocator.h (allocate): Throw std::bad_alloc when n > max_size().
...
2004-10-20 Paolo Carlini <pcarlini@suse.de>
* include/ext/bitmap_allocator.h (allocate): Throw std::bad_alloc
when n > max_size().
* include/ext/malloc_allocator.h (allocate): Likewise.
* include/ext/mt_allocator.h (allocate): Likewise.
* include/ext/new_allocator.h (allocate): Likewise.
* include/ext/array_allocator.h: Use __throw_bad_alloc().
* include/ext/pool_allocator.h: Use __builtin_expect.
* testsuite/ext/array_allocator/check_allocate_max_size.cc: New.
* testsuite/ext/bitmap_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/malloc_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/mt_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/new_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/pool_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/testsuite_allocator.h (check_allocate_max_size): New test.
From-SVN: r89351
2004-10-21 00:06:02 +00:00
Paolo Carlini
b67ed5e845
list_sort_search.cc: Include <ext/new_allocator.h>.
...
2004-10-19 Paolo Carlini <pcarlini@suse.de>
* testsuite/performance/20_util/allocator/list_sort_search.cc:
Include <ext/new_allocator.h>.
* testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.
From-SVN: r89269
2004-10-19 08:56:32 +00:00
Paolo Carlini
cc6e67d442
basic_string.tcc (_M_mutate): Do not reallocate unnecessarily when _M_rep() == &_S_empty_rep() and __new_size...
...
2004-10-18 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (_M_mutate): Do not reallocate
unnecessarily when _M_rep() == &_S_empty_rep() and __new_size
== capacity() (== 0): is ok to just leave everything unchanged.
* include/bits/basic_string.h: Minor formatting fixes.
* include/bits/basic_string.tcc: Likewise.
From-SVN: r89199
2004-10-18 08:43:17 +00:00
Benjamin Kosnik
7befac7140
mt_allocator.h (__pool::_M_get_align): New.
...
2004-10-17 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h (__pool::_M_get_align): New.
(__mt_alloc::allocate): Use it.
* src/mt_allocator.cc (__pool::_M_reclaim_block): Use it.
(__pool::_M_reserve_block): Simplify block allocation.
From-SVN: r89171
2004-10-17 15:22:03 +00:00
Dhruv Matani
a815571193
bitmap_allocator.h: Change unsigned int -> size_t...
...
2004-10-17 Dhruv Matani <dhruvbird@gmx.net>
Paolo Carlini <pcarlini@suse.de>
* include/ext/bitmap_allocator.h: Change unsigned int -> size_t: this
makes the code 64-bit correct and also fixes (together with using at
the beginning a bitmap 2 * size_t bytes wide) alignment issues: now
8 is guaranteed, easily tunable to 16 via _BALLOC_ALIGN_BYTES.
Fix pthread-rope7.cc fail by nulling out __mini_vector<> destructor.
* src/bitmap_allocator.cc: Change to size_t.
* config/linker-map.gnu: Adjust.
Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
From-SVN: r89170
2004-10-17 14:46:29 +00:00
Benjamin Kosnik
cd9333a726
[multiple changes]
...
2004-10-16 Benjamin Kosnik <bkoz@redhat.com>
* include/tr1/array: Don't use layout_type.
2004-10-16 Sashan Govender <sashang@gmail.com>
* include/tr1/array (array::end const): Fix casting from iterator
to const_iterator.
From-SVN: r89139
2004-10-16 13:48:34 +00:00
Paolo Carlini
0d6b41f2dd
bitmap_allocator.h: Qualify ::operator delete.
...
2004-10-15 Paolo Carlini <pcarlini@suse.de>
* include/ext/bitmap_allocator.h: Qualify ::operator delete.
* src/bitmap_allocator.cc: Likewise.
* src/mt_allocator.cc: Use ::operator delete, not delete,
consistently with ::operator new.
* include/ext/bitmap_allocator.h (deallocate): Check for null
pointer.
* testsuite/ext/bitmap_allocator/check_deallocate_null.cc: New.
* testsuite/testsuite_allocator.h (check_deallocate_null): Add test.
From-SVN: r89089
2004-10-15 10:54:57 +00:00
Benjamin Kosnik
5d1b2a1e42
mt_allocator.h (__mt_alloc::deallocate): Check for null pointer.
...
2004-10-14 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h (__mt_alloc::deallocate): Check for
null pointer.
* include/ext/pool_allocator.h (debug_allocator::deallocate):
Check pointer value.
* include/ext/debug_allocator.h (debug_allocator::deallocate):
Throw exceptions, don't abort.
* include/ext/array_allocator.h
(array_allocator_base::deallocate): Remove unused parameters.
* testsuite/testsuite_allocator.h (check_deallocate_null): New.
* testsuite/ext/mt_allocator/check_deallocate_null.cc: New.
* testsuite/ext/mt_allocator/check_deallocate_null_thread.cc: New.
* testsuite/ext/array_allocator/check_deallocate_null.cc: New.
* testsuite/ext/debug_allocator/check_deallocate_null.cc: New.
* testsuite/ext/malloc_allocator/check_deallocate_null.cc: New.
* testsuite/ext/new_allocator/check_deallocate_null.cc: New.
* testsuite/ext/pool_allocator/check_deallocate_null.cc: New.
* testsuite/testsuite_allocator.h (check_new): Add instance argument.
* testsuite/ext/array_allocator/check_new.cc: New.
From-SVN: r89060
2004-10-14 23:03:26 +00:00
Paolo Carlini
cff1f8d41e
bitmap_allocator.h (bitmap_allocator::_Alloc_block): Rename __unused to __M_unused.
...
2004-10-14 Paolo Carlini <pcarlini@suse.de>
* include/ext/bitmap_allocator.h (bitmap_allocator::_Alloc_block):
Rename __unused to __M_unused.
From-SVN: r89056
2004-10-14 21:44:13 +00:00
Benjamin Kosnik
1f042340f1
headers.cc: Add includes, compile only.
...
2004-10-14 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/ext/headers.cc: Add includes, compile only.
* testsuite/ext/hash_map.cc: Move to...
* testsuite/ext/hash_map/1.cc: ...here.
* testsuite/ext/14648.cc: Move to...
* testsuite/ext/hash_map/14648.cc: ...here.
* testsuite/ext/hash_map/instantiate.cc: Add.
* testsuite/ext/hash_set.cc: Move to...
* testsuite/ext/hash_set/1.cc: ...here.
* testsuite/ext/hash_set_explicit_instantiation.cc: Move to...
* testsuite/ext/hash_set/instantiate.cc: ...here.
* testsuite/ext/hash_check_construct_destroy.cc: Move to...
* testsuite/ext/hash_set/check_construct_destroy.cc: ...here.
* testsuite/ext/slist_check_construct_destroy.cc: Move to...
* testsuite/ext/slist/check_construct_destroy.cc: ...here.
* testsuite/ext/slist_explicit_instantiation.cc: Move to...
* testsuite/ext/slist/instantiate.cc: ...here.
From-SVN: r89054
2004-10-14 21:34:52 +00:00
Benjamin Kosnik
11aaaa84ae
mt_allocator.h: Tweaks.
...
2004-10-14 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/mt_allocator.h: Tweaks.
* src/mt_allocator.cc: Same.
From-SVN: r89052
2004-10-14 21:05:24 +00:00
Dhruv Matani
1399eca190
bitmap_allocator.h: Clean-up add/remove functions.
...
2004-10-14 Dhruv Matani <dhruvbird@gmx.net>
* ext/bitmap_allocator.h: Clean-up add/remove functions.
* src/bitmap_allocator.cc: New file. Contains the out-of-line
function definitions, static initialization of variables, and
explicit instantiations needed for the allocator.
* src/Makefile.am: Add.
* src/Makefile.in: Regenerate.
* config/linker.map.gnu: Add the necessary symbols.
From-SVN: r89042
2004-10-14 17:52:18 +00:00
Paolo Carlini
cbb0dcef12
basic_string.tcc (_S_create): Use consistently the exponential policy, simplify.
...
2004-10-13 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (_S_create): Use consistently
the exponential policy, simplify.
* testsuite/performance/21_strings/string_append_2.cc: New.
* include/ext/array_allocator.h (allocate): Fix bad_alloc check.
* testsuite/ext/array_allocator/2.cc: Fix wrt 64-bit archs (in
that case sizeof(_Rep) == 24).
From-SVN: r88972
2004-10-13 08:58:41 +00:00
Paolo Carlini
a3186d4e60
[multiple changes]
...
2004-10-12 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/17948
* include/bits/stl_tree.h (erase(iterator, iterator)): Revert
wrong commit of 2004-10-07.
2004-10-12 Scott Snyder <snyder@fnal.gov>
PR libstdc++/17948
* testsuite/23_containers/set/modifiers/17948.cc: New.
From-SVN: r88956
2004-10-13 00:11:14 +00:00
Benjamin Kosnik
5a1e5472f5
re PR libstdc++/17937 (Critical ~__pool troubles)
...
2004-10-11 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_deque.h: Correct for over-long lines.
2004-10-11 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/17937
* include/ext/mt_allocator.h (__pool::_M_destroy): New.
* src/mt_allocator.cc (__pool::~__pool): Change definitions to
_M_destroy.
* acconfig.h: Remove _GLIBCXX_USE___CXA_ATEXIT.
* acinclude.m4 (GLIBCXX_ENABLE_CXA_ATEXIT): Remove.
* configure.ac: Remove call to GLIBCXX_ENABLE_CXA_EXIT.
* configure: Regenerate.
* config/linker-map.gnu: Tweak exports.
* docs/html/ext/mt_allocator.html: Update docs.
* testsuite/ext/mt_allocator/deallocate_global-2.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_global-4.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_local-2.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_local-4.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Fix.
* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Fix.
From-SVN: r88913
2004-10-12 01:10:39 +00:00
Benjamin Kosnik
61b26514c2
PR libstdc++/16614 continued.
...
2004-10-11 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/16614 continued.
* include/ext/mt_allocator.h
(__per_type_pool_policy::_S_get_pool): Use saner defaults based on
specific type characteristics.
(__pool_base): Add constructor that takes a _Tune argument.
(__pool): Same.
* testsuite/ext/mt_allocator/tune-2.cc: Adjust default.
* testsuite/ext/mt_allocator/tune-4.cc: Same.
* testsuite/ext/mt_allocator/tune-3.cc: Same.
From-SVN: r88902
2004-10-11 20:26:53 +00:00
Joachim Kuebart
e55096f0ce
pool_allocator.cc (__pool_alloc_base::_M_allocate_chunk): Deal properly with exceptions thrown by ::operator new(size_t).
...
2004-10-11 Joachim Kuebart <kuebart@mathematik.uni-ulm.de>
Paolo Carlini <pcarlini@suse.de>
* src/pool_allocator.cc (__pool_alloc_base::_M_allocate_chunk):
Deal properly with exceptions thrown by ::operator new(size_t).
* testsuite/ext/pool_allocator/allocate_chunk.cc: New.
* include/ext/pool_allocator.h: Include <cstdlib>.
Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
From-SVN: r88872
2004-10-11 08:19:35 +00:00
Benjamin Kosnik
382c6e2df8
functexcept.h: Add guards.
...
2004-10-10 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/functexcept.h: Add guards.
* acinclude.m4 (GLIBCXX_ENABLE_THREADS): Tweak test.
* configure: Regenerate.
From-SVN: r88857
2004-10-10 21:54:41 +00:00
Paolo Carlini
a780ad2f43
monetary_members.cc (_S_construct_pattern): Give __ret a default value, thus avoiding spurious warnings.
...
2004-10-10 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc (_S_construct_pattern):
Give __ret a default value, thus avoiding spurious warnings.
* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Open either
words or linux.words, otherwise exit.
* testsuite/performance/27_io/ifstream_getline.cc: Slighlty tweak.
From-SVN: r88848
2004-10-10 17:55:23 +00:00