1 2004-02-02 Eric Christopher <echristo@redhat.com>
2 Zack Weinberg <zack@codesourcery.com>
4 * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use
6 * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto.
7 * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto
8 * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto.
9 * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto.
10 * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto.
11 * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto.
12 * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto.
13 * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
16 2004-02-02 Paolo Carlini <pcarlini@suse.de>
18 * include/bits/stl_function.h: Additional minor tweaks.
19 * include/bits/stl_multiset.h: Likewise.
21 * include/bits/stl_queue.h: Minor tweaks.
23 2004-02-02 Paolo Carlini <pcarlini@suse.de>
25 PR libstdc++/13976 (continued)
26 * include/ext/malloc_allocator.h (malloc_allocator::deallocate):
27 Make the second parameter unnamed, to void unused parameter
29 * include/ext/new_allocator.h (new_allocator::deallocate): Ditto.
31 2004-02-02 Paolo Carlini <pcarlini@suse.de>
34 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
35 Make the second parameter unnamed, to void unused parameter
37 * include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
38 * include/ext/new_allocator.h (new_allocator::allocate): Ditto.
40 2004-02-01 Paolo Carlini <pcarlini@suse.de>
42 * include/bits/stl_algo.h: Additional minor tweaks.
43 * include/bits/stl_map.h: Likewise.
44 * include/bits/stl_multimap.h: Likewise.
45 * include/bits/stl_multiset.h: Likewise.
46 * include/bits/stl_set.h: Likewise.
47 * include/bits/stl_tree.h: Likewise.
49 2004-02-01 Paolo Carlini <pcarlini@suse.de>
51 * include/bits/vector.tcc (vector::_M_insert_aux(iterator)):
54 2004-02-01 Paolo Carlini <pcarlini@suse.de>
56 * include/bits/stl_function.h: Additional minor tweaks.
58 2004-02-01 Paolo Carlini <pcarlini@suse.de>
60 * include/bits/deque.tcc: Wrap overlong lines, constify
61 a few variables, reformat according to the coding standards.
62 * include/bits/list.tcc: Likewise.
63 * include/bits/stl_deque.h: Likewise.
64 * include/bits/stl_function.h: Likewise.
65 * include/bits/stl_iterator.h: Likewise.
66 * include/bits/stl_iterator_base_funcs.h: Likewise.
67 * include/bits/stl_iterator_base_types.h: Likewise.
68 * include/bits/stl_list.h: Likewise.
69 * include/bits/stl_map.h: Likewise.
70 * include/bits/stl_multimap.h: Likewise.
71 * include/bits/stl_multiset.h: Likewise.
72 * include/bits/stl_relops.h: Likewise.
73 * include/bits/stl_set.h: Likewise.
75 2004-02-01 Paolo Carlini <pcarlini@suse.de>
77 * include/bits/stl_bvector.h: Wrap overlong lines, constify
78 a few variables, reformat according to the coding standards.
79 * include/bits/stl_tree.h: Likewise.
81 2004-01-31 Paolo Carlini <pcarlini@suse.de>
83 * include/bits/stl_algo.h: Minor additional reformat, add
85 * include/bits/stl_algobase.h: Add copyright year.
87 2004-01-31 Paolo Carlini <pcarlini@suse.de>
89 * include/bits/stl_algo.h: Wrap overlong lines, constify
90 a few variables, reformat according to the coding standards.
91 * include/bits/stl_algobase.h: Likewise.
92 * include/bits/stl_heap.h: Likewise.
94 2004-01-31 Paolo Carlini <pcarlini@suse.de>
96 * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
98 * include/bits/basic_string.h: Fix two comments.
100 2004-01-31 Per Bothner <per@bothner.com>
102 * include/ext/mt_allocator.h
103 (__mt_alloc::_S_thread_freelist_mutex): Guard with
104 __GTHREAD_MUTEX_INIT.
106 2004-01-31 Paolo Carlini <pcarlini@suse.de>
108 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
110 2004-01-30 Paolo Carlini <pcarlini@suse.de>
112 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
113 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
114 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
116 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
118 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
119 Don't use clear, but instead assign. Use insert.
121 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
123 * src/demangle.cc: Add instantiations.
124 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
125 * src/Makefile.in: Regenerate.
127 2004-01-30 David Edelsohn <edelsohn@gnu.org>
129 * src/allocator.cc: Protect _S_get_thread_id() and
130 _S_thread_key_destr() with #ifdef __GTHREADS.
132 2004-01-30 Paolo Carlini <pcarlini@suse.de>
134 Reshuffle performance testsuite.
135 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
136 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
137 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
138 fstream_seek_write.cc, ifstream_extract_float.cc,
139 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
140 list_create_fill_sort.cc, map_create_fill.cc,
141 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
142 ofstream_insert_float.cc, ofstream_insert_int.cc,
143 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
144 wchar_t_out.cc: Split into...
145 * testsuite/performance/20_util/allocator.cc: New.
146 * testsuite/performance/20_util/allocator_map_thread.cc: New.
147 * testsuite/performance/20_util/allocator_thread.cc: New.
148 * testsuite/performance/21_strings/string_append: New.
149 * testsuite/performance/22_locale/is_wchar_t.cc: New.
150 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
151 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
152 * testsuite/performance/22_locale/wchar_t_in.cc: New.
153 * testsuite/performance/22_locale/wchar_t_length.cc: New.
154 * testsuite/performance/22_locale/wchar_t_out.cc: New.
155 * testsuite/performance/23_containers/container_benchmark.cc: New.
156 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
157 * testsuite/performance/23_containers/map_create_fill.cc: New.
158 * testsuite/performance/26_numerics/complex_norm.cc: New.
159 * testsuite/performance/27_io/cout_insert_int.cc: New.
160 * testsuite/performance/27_io/filebuf_copy.cc: New.
161 * testsuite/performance/27_io/filebuf_sputc.cc: New.
162 * testsuite/performance/27_io/fstream_seek_write.cc: New.
163 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
164 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
165 * testsuite/performance/27_io/ifstream_getline.cc: New.
166 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
167 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
169 2004-01-30 Paolo Carlini <pcarlini@suse.de>
171 * include/bits/basic_string.tcc (_Rep::_S_create):
172 Never allocate a string bigger than max_size(); always keep
173 __capacity and __size in sync to avoid memory leaks at
176 2004-01-30 Paolo Carlini <pcarlini@suse.de>
178 * include/bits/basic_string.tcc (_S_construct(_InIterator,
179 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
180 the double loop, streamline.
182 * include/bits/basic_string.tcc: Very minor tweaks.
184 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
186 * scripts/check_performance: Only compile with $THREAD_FLAG
187 when test is marked to require it. Allow multiple
188 compilations/executions of marked tests.
189 * testsuite/testsuite_performance.h (report_performance):
190 Report dynamic thread support status.
191 (report_header): Likewise.
192 * testsuite/performance/allocator.cc: Stabilize iteration
193 count. Support more allocators. Mark each allocator test to
194 run and report independently.
195 * testsuite/performance/allocator_map_thread.cc: Likewise.
196 * testsuite/performance/allocator_thread.cc: Likewise.
198 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
200 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
201 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
202 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
203 std::get_temporary_buffer() instead of duplicating its code.
204 Update to C++STYLE conventions.
205 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
206 new() instead of std::malloc().
207 (return_temporary_buffer): Use ::operator delete() instead of
210 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
212 * include/bits/allocator.h: Temporary switch to new_allocator as
213 the default to unjam bootstraps.
215 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
217 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
218 * include/Makefile.in: Regenerate.
219 * include/bits/allocator_traits.h: Remove.
220 * include/bits/allocator.h: Remove allocator_traits.h include, and
222 (allocator): Empty base class, inherit from the underlying allocator.
223 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
224 * src/allocator.cc: ...here. New. For the underlying allocators.
225 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
226 * config/linker-map.gnu: Remove __pool_alloc bits.
227 * src/Makefile.am (sources): Add allocator.cc.
228 * src/Makefile.in: Regenerate.
229 * testsuite/20_util/allocator/1.cc: Split second test into...
230 * testsuite/20_util/allocator/8230.cc: ...this.
231 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
232 typedef to use std::allocatore. Format.
233 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
235 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
236 __throw_bad_alloc calls. Don't include <memory>.
237 * include/ext/malloc_allocator.h: Remove <memory> include.
238 * include/ext/new_allocator.h (new_allocator): Same.
239 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
240 declaration. Switch __alloc to _Alloc.
241 * include/ext/hashtable.h: Remove __alloc.
242 * include/backward/alloc.h: Only inject allocator, not
243 implementation details.
245 * include/ext/mt_allocator.h: Replace free with delete.
247 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
249 * src/globals_io.cc: Change to __gnu_internal namespace.
250 * src/globals_locale.cc: Same.
251 * src/locale_init.cc: Same.
252 * src/ios_init.cc: Same.
254 2004-01-28 Stefan Olsson <stefan@snon.net>
256 * include/ext/mt_allocator.h: Replaced all malloc() calls with
257 operator new(). Added support for the env variable
258 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
259 one in allocate() as well). Fix typos.
261 2004-01-28 Paolo Carlini <pcarlini@suse.de>
263 * include/bits/basic_string.h (_S_create(size_t,
264 const _Alloc&): Change signature to take two size_type
266 * include/bits/basic_string.tcc (_S_construct(_InIterator,
267 _InIterator, const _Alloc&, input_iterator_tag)): Update
269 (_S_construct(_InIterator, _InIterator, const _Alloc&,
270 forward_iterator_tag)): Likewise.
271 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
272 (_M_mutate(size_type, size_type, size_type)): Don't
273 implement the exponential growth policy, demand it to
274 _S_create, update call and simplify.
275 (_M_clone(const _Alloc&, size_type)): Likewise.
276 (_S_create(size_type, size_type, const _Alloc&)): Implement
277 the growth policy, simplify otherwise.
279 * include/bits/basic_string.h (_Rep::operator[]): Tweak
280 signature to take a size_type, consistently with the other
283 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
285 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
286 delete declarations, add include and test variable.
288 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
290 * include/bits/codecvt.h, include/bits/locale_facets.h,
291 include/bits/postypes.h, include/bits/stl_bvector.h,
292 include/bits/stl_multiset.h, include/bits/stl_set.h,
293 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
294 include/std/std_complex.h: Document.
296 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
299 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
300 iword/pword selector.
301 (ios_base::iword, ios_base::pword): Use it.
302 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
303 iword or pword member on alloc failure.
304 * testsuite/27_io/ios_base/storage/11584.cc: New test.
306 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
307 PJ Darcy <darcypj@us.ibm.com>
309 * configure.host: Add support for *-tpf.
310 * crossconfig.m4: Likewise.
311 * configure: Regenerate.
312 * config/os/tpf: New directory.
313 * config/os/tpf/os_defines.h: New file.
314 * config/os/tpf/ctype_base.h: Likewise.
315 * config/os/tpf/ctype_inline.h: Likewise.
316 * config/os/tpf/ctype_noninline.h: Likewise.
318 2004-01-27 Paolo Carlini <pcarlini@suse.de>
321 * include/bits/sstream.tcc: Guard use of extern template.
323 2004-01-27 Paolo Carlini <pcarlini@suse.de>
325 * include/bits/basic_string.tcc
326 (basic_string(const basic_string&, size_type, size_type),
327 basic_string(const basic_string&, size_type, size_type,
328 const _Alloc&)): Avoid unnecessarily constructing iterators.
330 2004-01-26 Paolo Carlini <pcarlini@suse.de>
332 * config/locale/generic/c_locale.cc: Fix throw messages
333 to use the __N marker.
334 * config/locale/gnu/c_locale.cc: Likewise.
335 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
337 * docs/html/17_intro/C++STYLE: Likewise.
338 * include/bits/basic_ios.tcc: Likewise.
339 * include/bits/fstream.tcc: Likewise.
340 * include/bits/vector.tcc: Likewise.
341 * include/ext/ropeimpl.h: Likewise.
342 * include/std/std_bitset.h: Likewise.
343 * src/ios.cc: Likewise.
344 * src/locale.cc: Likewise.
345 * src/localename.cc: Likewise.
347 2004-01-26 Paolo Carlini <pcarlini@suse.de>
349 * include/bits/basic_string.h (_M_replace_aux): Use the
350 __N marker in throw message.
351 * include/bits/basic_string.tcc (assign(const _CharT*,
352 size_type), insert(size_type, const _CharT*, size_type),
353 replace(size_type, size_type, const _CharT*, size_type),
354 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
357 * include/bits/basic_string.h, include/bits/basic_string.tcc:
358 Fold overlong lines, minor formatting changes.
360 2004-01-26 Paolo Carlini <pcarlini@suse.de>
362 * include/bits/basic_string.h (replace(iterator, iterator,
363 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
364 (replace(iterator, iterator, const _CharT*)): Ditto.
365 (replace(iterator, iterator, const _CharT*, size_type)):
366 Add missing _GLIBCXX_DEBUG_PEDASSERT.
368 2004-01-26 Paolo Carlini <pcarlini@suse.de>
370 * include/bits/basic_string.tcc (replace(size_type,
371 size_type, const _CharT*, size_type)): Implement optimized
372 in-place algorithm for non-overlapping ranges.
373 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
374 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
376 * include/bits/basic_string.tcc (insert(size_type,
377 const _CharT*, size_type)): Tweak slightly.
379 2004-01-26 Andreas Schwab <schwab@suse.de>
381 * config/locale/gnu/monetary_members.cc: Restore locale before
382 rethrowing exception.
384 2004-01-25 Paolo Carlini <pcarlini@suse.de>
386 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
388 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
391 * include/bits/basic_string.tcc: Very minor tweaks.
393 2004-01-25 Paolo Carlini <pcarlini@suse.de>
395 * testsuite/performance/string_append.cc: Increase number
398 2004-01-25 Paolo Carlini <pcarlini@suse.de>
400 * include/bits/basic_string.h (erase(size_type, size_type),
401 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
402 instead, thus avoiding redundant check for length_error.
404 * include/bits/basic_string.h: Tweak some comments.
406 2004-01-24 Paolo Carlini <pcarlini@suse.de>
408 * include/bits/basic_string.tcc (operator+(const _CharT*,
409 const basic_string&)): No need to go through the append
410 taking two iterators.
412 2004-01-24 Paolo Carlini <pcarlini@suse.de>
414 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
415 Revert last change to use std::min: machine language is worse.
416 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
417 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
418 (find_last_not_of(_CharT, size_type)): Ditto.
420 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
421 size_type)): Discard the value returned by _M_check.
422 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
423 (append(const basic_string&, size_type, size_type)): Ditto.
424 (copy(_CharT*, size_type, size_type)): Ditto.
425 (compare(size_type, size_type, const basic_string&)): Ditto.
426 (compare(size_type, size_type, const basic_string&,
427 size_type, size_type)): Ditto.
428 (compare(size_type, size_type, const _CharT*)): Ditto.
429 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
431 2004-01-24 Paolo Carlini <pcarlini@suse.de>
433 * include/bits/basic_string.h (insert(size_type,
434 const basic_string&, size_type, size_type)): Define inline here.
435 * include/bits/basic_string.tcc (insert(size_type,
436 const basic_string&, size_type, size_type)): Move inline.
438 2004-01-24 Paolo Carlini <pcarlini@suse.de>
440 * include/bits/basic_string.h (assign(const basic_string&,
441 size_type, size_type)): Define inline here.
442 (replace(size_type, size_type, const basic_string&,
443 size_type, size_type)): Ditto.
444 (_M_replace_dispatch(iterator, iterator, _InputIterator,
445 _InputIterator, __false_type)): Only declare.
446 (_M_replace(iterator, iterator, _InputIterator,
447 _InputIterator)): Remove.
448 * include/bits/basic_string.tcc (assign(const basic_string&,
449 size_type, size_type)): Move inline.
450 (replace(size_type, size_type, const basic_string&,
451 size_type, size_type)): Ditto.
452 (_M_replace_dispatch(iterator, iterator, _InputIterator,
453 _InputIterator, __false_type)): Define, now does also what
454 _M_replace did before.
455 * src/string-inst.cc (_M_replace): Don't instantiate.
457 * include/bits/basic_string.tcc (find(const _CharT*,
458 size_type, size_type)): Tidy.
459 (rfind(_CharT, size_type)): Ditto.
460 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
461 (find_first_not_of(_CharT, size_type)): Ditto.
462 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
463 (find_last_not_of(_CharT, size_type)): Ditto.
465 2004-01-23 Paolo Carlini <pcarlini@suse.de>
468 * include/debug/bitset (operator|=): Fix typo.
469 * testsuite/23_containers/bitset/operations/13838.cc: New.
471 2004-01-23 Paolo Carlini <pcarlini@suse.de>
473 * include/bits/basic_string.tcc (insert(size_type,
474 const _CharT*, size_type __n)): Fix length_error check.
475 (replace(size_type, size_type, const _CharT*, size_type):
476 Ditto; call _M_replace_safe.
477 (_M_replace_aux(size_type, size_type, size_type, _CharT):
478 Fix length_error check.
479 (_M_replace(iterator, iterator, _InputIterator,
480 _InputIterator)): Ditto, tweak.
481 (_M_replace_safe(size_type, size_type, const _CharT*,
482 size_type)): Remove length_error check.
484 * include/bits/basic_string.tcc (append(const basic_string&),
485 append(const basic_string&, size_type, size_type)): Tweak
488 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
489 size_type)): If __n == 0 don't call traits::copy.
491 2004-01-23 Stefan Olsson <stefan@snon.net>
493 * include/ext/mt_allocator.h: Reduce lock contention.
495 2004-01-23 Paolo Carlini <pcarlini@suse.de>
498 * include/bits/fstream.tcc (underflow): Remove unused
500 * include/bits/streambuf_iterator.h (equal): Ditto.
501 * include/bits/locale_facets.h (_M_convert_from_char):
504 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
507 * config/linker-map.gnu (nan): Delete.
508 * libmath/mathconf.h (NAN, nan): Delete.
509 * linkage.m4 (nan): Don't check for it.
510 * libmath/nan.c: Delete file.
512 * config.h.in, configure: Regenerate.
514 2004-01-23 Paolo Carlini <pcarlini@suse.de>
516 * include/bits/basic_string.h (push_back(_CharT)):
518 (insert(size_type, const basic_string&)): Trivial tweak.
519 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
520 (insert(iterator, _CharT)): Ditto.
521 (erase(size_type, size_type)): Ditto.
522 (erase(iterator)): Ditto.
523 (erase(iterator, iterator)): Ditto.
524 (replace(size_type, size_type, size_type, _CharT)): Ditto.
526 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
529 * testsuite/performance/allocator_map_thread.cc: New test.
531 2004-01-22 Paolo Carlini <pcarlini@suse.de>
533 * include/bits/locale_facets.tcc
534 (money_put::do_put(..., long double)): Use the basic_string
535 constructor for char arrays, not that for C-strings, to pass
536 __digits to do_put(..., const string_type&): __ws isn't
539 2004-01-22 Paolo Carlini <pcarlini@suse.de>
541 * include/bits/basic_string.h (_M_replace_safe): Change
542 signatures to take size_types and const _CharT*.
543 (_M_replace_aux): Likewise, takes size_types instead of
545 (append(size_type, _CharT)): Update call.
546 (assign(size_type, _CharT)): Ditto.
547 (replace(iterator, iterator, size_type, _CharT)): Ditto.
548 (_M_replace_dispatch(iterator, iterator, _Integer,
549 _Integer, __true_type)): Ditto.
550 * include/bits/basic_string.tcc (assign(const _CharT*,
552 (insert(size_type, const _CharT*, size_type)): Ditto.
553 (replace(size_type, size_type, const _CharT*,
555 (_M_replace(iterator, iterator, _InputIterator,
556 _InputIterator)): Ditto.
557 (append(const basic_string&)): Ditto.
558 (append(const basic_string&, size_type, size_type): Ditto.
559 (append(const _CharT*, size_type): Ditto.
560 (_M_replace_safe, _M_replace_safe): Change definitions
561 accordingly, simplify.
562 * string-inst.cc (_M_replace_safe): Don't instantiate.
564 2004-01-21 Paolo Carlini <pcarlini@suse.de>
566 * include/bits/basic_string.tcc (append(const basic_string&)):
567 Revert previous change.
568 (append(const basic_string&, size_type, size_type)): Revert
569 previous change, use _M_check and _M_limit.
571 2004-01-21 Paolo Carlini <pcarlini@suse.de>
573 * include/bits/basic_string.h (_M_check): Change to return
574 a checked __pos and take an additional const char* argument.
575 (_M_fold): Rename to _M_limit, change to return a size_type,
576 corresponding to the __off limited to the actual length.
577 (insert(size_type, size_type, _CharT)): Update call, call
579 (insert(iterator, _CharT)): Call replace(iterator, iterator,
580 size_type, _CharT) instead.
581 (erase(size_type, size_type)): Update calls.
582 (replace(size_type, size_type, size_type, _CharT)): Ditto.
583 (substr(size_type, size_type)): Use _M_check.
584 * include/bits/basic_string.tcc (basic_string(const basic_string&,
585 size_type, size_type)): Update calls.
586 (basic_string(const basic_string&, size_type, size_type,
587 const _Alloc&)): Ditto.
588 (assign(const basic_string&, size_type, size_type)): Use the
589 new _M_check and _M_limit.
590 (insert(size_type, const basic_string&, size_type, size_type):
592 (insert(size_type, const _CharT*, size_type)): Ditto.
593 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
594 (replace(size_type, size_type, const basic_string&,
595 size_type, size_type)): Ditto.
596 (append(const basic_string&)): Ditto.
597 (append(const basic_string&, size_type, size_type)): Ditto.
598 (copy(_CharT*, size_type, size_type)): Ditto.
599 (compare(size_type, size_type, const basic_string&)): Ditto.
600 (compare(size_type, size_type, const basic_string&,size_type,
602 (compare(size_type, size_type, const _CharT*)): Ditto.
603 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
605 2004-01-19 Stefan Olsson <stefan@snon.net>
607 * include/ext/mt_allocator.h: If a thread, when it dies, still has
608 memory on it's freelist this memory is not returned to global
609 list. Simplification of deallocate so that memory is always
610 returned to the calling thread id's freelist instead of to
611 global. Fix typos. Add volatile where appropriate.
613 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
615 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
616 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
617 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
619 2004-01-19 Paolo Carlini <pcarlini@suse.de>
621 * src/debug.cc: Make sure all the names are prefixed with
622 double (or single) underscore.
624 2004-01-19 Paolo Carlini <pcarlini@suse.de>
626 * src/debug.cc: Trivial formatting change.
628 2004-01-19 Paolo Carlini <pcarlini@suse.de>
630 * include/bits/basic_string.tcc (_S_construct(size_type,
631 _CharT, const _Alloc&)): Remove redundant try/catch.
632 (_M_mutate(size_type, size_type, size_type)): Ditto.
633 (_M_clone(const _Alloc&, size_type)): Ditto.
635 2004-01-18 Paolo Carlini <pcarlini@suse.de>
637 * include/bits/basic_string.h (c_str()): Simplify, due to
638 21.3.4 the internal representation is always kept null-terminated.
639 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
640 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
641 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
644 2004-01-18 Paolo Carlini <pcarlini@suse.de>
646 * include/bits/basic_string.h (append(size_type, _CharT)):
647 Moved inline, just call _M_replace_aux, no source iterators at
648 risk of being clobbered.
649 (assign(size_type, _CharT)): Call directly _M_replace_aux.
650 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
651 input_iterator_tag)): Remove fifth unused argument.
652 (_M_replace_dispatch(iterator, iterator, _InputIterator,
653 _InputIterator, __false_type)): Update call.
654 * include/bits/basic_string.tcc (replace(size_type, size_type,
655 const _CharT*, size_type)): Update call.
656 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
657 throw string literal.
658 (_M_replace_safe(iterator, iterator, _ForwardIterator,
659 _ForwardIterator)): Likewise.
660 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
661 input_iterator_tag)): Remove fifth unused argument.
662 (append(size_type __n, _CharT __c)): Move inline.
663 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
664 const C*, const C*, input_iterator_tag)): Remove fifth unused
667 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
669 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
670 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
672 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
674 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
677 2004-01-15 Stefan Olsson <stefan@snon.net>
679 * include/ext/mt_allocator.h: Reuse thread id's as soon as
680 possible by changing the behaviour of thread_freelist to do
681 push_front when threads die instead of push_back.
683 2004-01-14 Paolo Carlini <pcarlini@suse.de>
685 * include/bits/locale_facets.h (struct __numpunct_cache):
686 Add member _M_grouping_size, caching the length of _M_grouping.
687 (__numpunct_cache<>::_M_cache): Assign the latter.
688 (__verify_grouping): Move declaration...
689 * include/bits/locale_facets.tcc (__verify_grouping):
690 ... here, change signature to take a const char* and a size_t
691 for the grouping; not a template anymore.
692 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
693 Likewise change signature and tweak consistently.
694 (num_get::_M_extract_float, num_get::_M_extract_int,
695 num_put::_M_insert_int, num_put::_M_insert_float,
696 money_get::do_get(string_type&), money_get::do_put(string_type)):
698 * config/locale/generic/numeric_members.cc
699 (numpunct<>::_M_initialize_numpunct): Assign the new member.
700 * config/locale/gnu/numeric_members.cc
701 (numpunct<>::_M_initialize_numpunct): Likewise.
702 * src/locale-inst.cc (__add_grouping): Tweak signature.
703 (__verify_grouping): Don't instantiate, not a template anymore.
705 * include/bits/locale_facets.h: Rename _M_truename_len ->
706 _M_truename_size, _M_falsename_len -> _M_falsename_size.
707 * include/bits/locale_facets.tcc: Likewise.
708 * config/locale/generic/numeric_members.cc: Likewise.
709 * config/locale/gnu/numeric_members.cc: Likewise.
711 2004-01-14 Stefan Olsson <stefan@snon.net>
713 * include/ext/mt_allocator.h: Fixups.
714 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
715 * testsuite/performance/allocator_thread.cc: Same.
717 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
719 * testsuite/performance/ifstream_extract_float.cc: Add higher
721 * testsuite/performance/ofstream_insert_float.cc: Same.
723 2004-01-13 Paolo Carlini <pcarlini@suse.de>
725 * src/locale-misc-inst.cc (__convert_from_v(long),
726 __convert_from_v(unsigned long), __convert_from_v(long long),
727 __convert_from_v(unsigned long long)): Remove, unused.
729 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
731 * testsuite/performance/ifstream_extract_float.cc: New.
732 * testsuite/performance/ofstream_insert_float.cc: Float generation
735 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
736 * 20_util/auto_ptr/1.cc: ...this.
737 * 20_util/auto_ptr/2.cc: Same.
738 * 20_util/auto_ptr/3.cc: Same.
739 * 20_util/auto_ptr/3946.cc: Same.
740 * 20_util/auto_ptr/4.cc: Same.
741 * 20_util/auto_ptr/5.cc: Same.
742 * 20_util/auto_ptr/6.cc: Same.
743 * 20_util/auto_ptr/7.cc: Same.
744 * 20_util/auto_ptr/assign_neg.cc
745 * 20_util/pairs.cc: Break into...
746 * 20_util/pair/1.cc: ...this.
747 * 20_util/pair/2.cc: Same.
748 * 20_util/pair/3.cc: Same.
749 * 20_util/pair/4.cc: Same.
751 2004-01-13 Paolo Carlini <pcarlini@suse.de>
753 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
754 Set correctly just basefield, the only group that matters.
756 2004-01-13 Paolo Carlini <pcarlini@suse.de>
758 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
759 (_Rope_rep_base): Inherit directly from the rope allocator;
760 use rebinding instead of _Alloc_traits; pick up data member
761 from _Rope_rep_alloc_base.
762 (_Rope_alloc_base): Eliminate.
763 (_Rope_base): Inherit directly from the rope allocator; use
764 rebinding instead of _Alloc_traits; pick up data member from
766 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
767 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
769 2004-01-13 Paolo Carlini <pcarlini@suse.de>
772 * include/bits/basic_string.tcc (compare(size_type, size_type,
773 const _CharT*, size_type)): Implement correctly the resolution
774 of DR 5: basically, s is a char array, -not- a C string.
775 * include/bits/basic_string.h: Tweak some comments.
776 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
777 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
779 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
781 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
784 2004-01-12 Paolo Carlini <pcarlini@suse.de>
786 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
788 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
791 2004-01-12 Paolo Carlini <pcarlini@suse.de>
793 * include/bits/locale_facets.h (struct __numpunct_cache):
794 Add members _M_truename_len and _M_falsename_len, caching
795 the lengths of _M_truename and _M_falsename.
796 (__numpunct_cache<>::_M_cache): Assign the latter.
797 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
798 num_put::do_put(bool)): Use the new members, thus avoiding
799 computing string lengths again and again.
800 * config/locale/generic/numeric_members.cc
801 (numpunct<>::_M_initialize_numpunct): Assign the new members.
802 * config/locale/gnu/numeric_members.cc
803 (numpunct<>::_M_initialize_numpunct): Likewise.
805 2004-01-12 Mark Mitchell <mark@codesourcery.com>
807 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
808 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
810 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
811 and remove Cygwin XFAIL.
812 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
813 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
814 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
815 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
817 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
818 * testsuite/27_io/objects/char/7.cc: Likewise.
819 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
820 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
821 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
823 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
825 * include/std/std_complex.h (std::complex<>::real): Return a
826 reference. Add non-const overload.
827 (std::complex<>::real): Likewise.
828 (std::real): Likewise.
829 (std::imag): Likewise.
830 (std::operator+): Tidy.
831 (std::operator-): Likewise.
832 (std::operator*): Likewise.
833 (std::operator/): Likewise.
834 (std::operator>>): Likewise.
836 2004-01-11 Paolo Carlini <pcarlini@suse.de>
839 * include/bits/fstream.tcc (imbue): Exploit the external
840 buffer to imbue 'on the fly' a new locale and convert its
841 remainder with the new codecvt facet.
842 (underflow): Tweak slightly to deal with this special case.
843 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
844 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
845 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
846 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
847 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
849 2004-01-10 Paolo Carlini <pcarlini@suse.de>
851 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
854 2004-01-10 Paolo Carlini <pcarlini@suse.de>
857 * include/bits/locale_classes.h (class locale): Fix category
859 * testsuite/22_locale/locale/13630.cc: Add.
861 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
863 * include/bits/locale_facets.h: Make a name really dependent. This
864 will be needed when Core Issue 224 is implemented.
866 2004-01-09 Paolo Carlini <pcarlini@suse.de>
868 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
869 * testsuite/performance/allocator_thread.cc: Likewise.
871 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
873 * crossconfig.m4: Add LFS, io bits to linux cross config.
874 * acconfig.h: Remove obsolete bits, reorder.
875 * config.h.in: Regenerate.
879 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
881 * include/bits/stl_list.h:
882 * include/bits/list.tc:
884 Performance enhancements for destructor, push_front(),
885 push_back(), pop_front(), pop_back(), sort()
886 Eliminated static_casts where possible.
887 Moved code out of header files into new src/list.cc
888 implementation file for library where possible.
889 Remove inheritance from iterator class and create separate
890 classes for non-constant and constant iterators.
891 * include/bits/stl_tree.h (_Rb_tree class):
893 Only erase contents in destructor.
894 Eliminate unnecessary initialization in assignment operator.
895 Optimize for the nominal case by not checking whether
896 container is empty in clear().
897 Re-order test in _M_insert() to improve performance.
898 Move initialization of new node's left & right pointers to
899 src/tree.cc to where new node's colour is initialized
900 and to reduce the amount of inline code.
901 Use _M_leftmost() and _M_end() to improve readability where
903 Create separate classes for non-constant and constant
904 iterators to clarify code, avoid extra template parameters and
905 casting away constness.
907 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
909 * src/Makefile.am (sources): Add list.cc, tree.cc.
910 * src/stl_tree.cc: Move to...
911 * src/tree.cc: ...here.
913 * config/linker-map.gnu: Tweaks.
914 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
915 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
917 * bits/stl_vector.h: Column wrap comments.
919 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
921 (re-open) PR libstdc++/12658
922 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
923 (locale::global): Likewise.
925 2004-01-07 Paolo Carlini <pcarlini@suse.de>
927 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
928 Remove redundant #include.
929 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
930 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
931 re-enable normal testing.
932 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
934 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
935 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
937 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
939 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
941 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
943 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
945 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
947 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
949 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
950 More properly, #include <locale>.
951 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
952 Remove redundant #include.
953 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
954 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
955 redundant DejaGnu directive.
956 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
959 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
960 Stefan Olsson <stefan@snon.net>
962 * scripts/check_performance: Use -pthread.
963 * testsuite/performance/allocator.cc: Tweaks, add list.
964 * testsuite/performance/allocator_thread.cc: New.
966 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
968 * include/bits/locale_facets.h: Document public classes and
970 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
973 2004-01-06 Paolo Carlini <pcarlini@suse.de>
975 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
976 Remove redundant #includes.
977 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
979 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
981 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
982 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
983 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
984 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
985 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
986 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
987 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
988 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
989 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
990 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
991 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
992 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
993 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
994 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
995 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
997 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
999 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
1001 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
1003 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
1005 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
1006 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
1007 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
1009 2004-01-04 Paolo Carlini <pcarlini@suse.de>
1011 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
1012 Remove redundant #includes.
1013 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
1015 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
1017 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
1019 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
1021 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
1023 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
1025 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
1027 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
1029 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
1031 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
1033 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
1035 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
1038 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1041 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
1043 * testsuite/27_io/basic_fstream/4.cc: Likewise.
1044 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
1045 * testsuite/27_io/basic_ios/4.cc: Likewise.
1046 * testsuite/27_io/basic_iostream/4.cc: Likewise.
1047 * testsuite/27_io/basic_istream/4.cc: Likewise.
1048 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
1049 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
1050 * testsuite/27_io/basic_ostream/4.cc: Likewise.
1051 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
1052 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
1053 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
1055 2004-01-04 Paolo Carlini <pcarlini@suse.de>
1057 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
1058 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
1059 always use double underscored names.
1060 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
1062 * include/bits/locale_facets.h (struct __numpunct_cache):
1063 Dimension _M_atoms_out and _M_atoms_in one position smaller.
1064 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out