1 2004-02-02 Paolo Carlini <pcarlini@suse.de>
4 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
5 Make the second parameter unnamed, to void unused parameter
7 * include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
8 * include/ext/new_allocator.h (new_allocator::allocate): Ditto.
10 2004-02-01 Paolo Carlini <pcarlini@suse.de>
12 * include/bits/stl_algo.h: Additional minor tweaks.
13 * include/bits/stl_map.h: Likewise.
14 * include/bits/stl_multimap.h: Likewise.
15 * include/bits/stl_multiset.h: Likewise.
16 * include/bits/stl_set.h: Likewise.
17 * include/bits/stl_tree.h: Likewise.
19 2004-02-01 Paolo Carlini <pcarlini@suse.de>
21 * include/bits/vector.tcc (vector::_M_insert_aux(iterator)):
24 2004-02-01 Paolo Carlini <pcarlini@suse.de>
26 * include/bits/stl_function.h: Additional minor tweaks.
28 2004-02-01 Paolo Carlini <pcarlini@suse.de>
30 * include/bits/deque.tcc: Wrap overlong lines, constify
31 a few variables, reformat according to the coding standards.
32 * include/bits/list.tcc: Likewise.
33 * include/bits/stl_deque.h: Likewise.
34 * include/bits/stl_function.h: Likewise.
35 * include/bits/stl_iterator.h: Likewise.
36 * include/bits/stl_iterator_base_funcs.h: Likewise.
37 * include/bits/stl_iterator_base_types.h: Likewise.
38 * include/bits/stl_list.h: Likewise.
39 * include/bits/stl_map.h: Likewise.
40 * include/bits/stl_multimap.h: Likewise.
41 * include/bits/stl_multiset.h: Likewise.
42 * include/bits/stl_relops.h: Likewise.
43 * include/bits/stl_set.h: Likewise.
45 2004-02-01 Paolo Carlini <pcarlini@suse.de>
47 * include/bits/stl_bvector.h: Wrap overlong lines, constify
48 a few variables, reformat according to the coding standards.
49 * include/bits/stl_tree.h: Likewise.
51 2004-01-31 Paolo Carlini <pcarlini@suse.de>
53 * include/bits/stl_algo.h: Minor additional reformat, add
55 * include/bits/stl_algobase.h: Add copyright year.
57 2004-01-31 Paolo Carlini <pcarlini@suse.de>
59 * include/bits/stl_algo.h: Wrap overlong lines, constify
60 a few variables, reformat according to the coding standards.
61 * include/bits/stl_algobase.h: Likewise.
62 * include/bits/stl_heap.h: Likewise.
64 2004-01-31 Paolo Carlini <pcarlini@suse.de>
66 * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
68 * include/bits/basic_string.h: Fix two comments.
70 2004-01-31 Per Bothner <per@bothner.com>
72 * include/ext/mt_allocator.h
73 (__mt_alloc::_S_thread_freelist_mutex): Guard with
76 2004-01-31 Paolo Carlini <pcarlini@suse.de>
78 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
80 2004-01-30 Paolo Carlini <pcarlini@suse.de>
82 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
83 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
84 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
86 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
88 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
89 Don't use clear, but instead assign. Use insert.
91 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
93 * src/demangle.cc: Add instantiations.
94 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
95 * src/Makefile.in: Regenerate.
97 2004-01-30 David Edelsohn <edelsohn@gnu.org>
99 * src/allocator.cc: Protect _S_get_thread_id() and
100 _S_thread_key_destr() with #ifdef __GTHREADS.
102 2004-01-30 Paolo Carlini <pcarlini@suse.de>
104 Reshuffle performance testsuite.
105 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
106 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
107 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
108 fstream_seek_write.cc, ifstream_extract_float.cc,
109 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
110 list_create_fill_sort.cc, map_create_fill.cc,
111 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
112 ofstream_insert_float.cc, ofstream_insert_int.cc,
113 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
114 wchar_t_out.cc: Split into...
115 * testsuite/performance/20_util/allocator.cc: New.
116 * testsuite/performance/20_util/allocator_map_thread.cc: New.
117 * testsuite/performance/20_util/allocator_thread.cc: New.
118 * testsuite/performance/21_strings/string_append: New.
119 * testsuite/performance/22_locale/is_wchar_t.cc: New.
120 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
121 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
122 * testsuite/performance/22_locale/wchar_t_in.cc: New.
123 * testsuite/performance/22_locale/wchar_t_length.cc: New.
124 * testsuite/performance/22_locale/wchar_t_out.cc: New.
125 * testsuite/performance/23_containers/container_benchmark.cc: New.
126 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
127 * testsuite/performance/23_containers/map_create_fill.cc: New.
128 * testsuite/performance/26_numerics/complex_norm.cc: New.
129 * testsuite/performance/27_io/cout_insert_int.cc: New.
130 * testsuite/performance/27_io/filebuf_copy.cc: New.
131 * testsuite/performance/27_io/filebuf_sputc.cc: New.
132 * testsuite/performance/27_io/fstream_seek_write.cc: New.
133 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
134 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
135 * testsuite/performance/27_io/ifstream_getline.cc: New.
136 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
137 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
139 2004-01-30 Paolo Carlini <pcarlini@suse.de>
141 * include/bits/basic_string.tcc (_Rep::_S_create):
142 Never allocate a string bigger than max_size(); always keep
143 __capacity and __size in sync to avoid memory leaks at
146 2004-01-30 Paolo Carlini <pcarlini@suse.de>
148 * include/bits/basic_string.tcc (_S_construct(_InIterator,
149 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
150 the double loop, streamline.
152 * include/bits/basic_string.tcc: Very minor tweaks.
154 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
156 * scripts/check_performance: Only compile with $THREAD_FLAG
157 when test is marked to require it. Allow multiple
158 compilations/executions of marked tests.
159 * testsuite/testsuite_performance.h (report_performance):
160 Report dynamic thread support status.
161 (report_header): Likewise.
162 * testsuite/performance/allocator.cc: Stabilize iteration
163 count. Support more allocators. Mark each allocator test to
164 run and report independently.
165 * testsuite/performance/allocator_map_thread.cc: Likewise.
166 * testsuite/performance/allocator_thread.cc: Likewise.
168 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
170 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
171 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
172 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
173 std::get_temporary_buffer() instead of duplicating its code.
174 Update to C++STYLE conventions.
175 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
176 new() instead of std::malloc().
177 (return_temporary_buffer): Use ::operator delete() instead of
180 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
182 * include/bits/allocator.h: Temporary switch to new_allocator as
183 the default to unjam bootstraps.
185 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
187 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
188 * include/Makefile.in: Regenerate.
189 * include/bits/allocator_traits.h: Remove.
190 * include/bits/allocator.h: Remove allocator_traits.h include, and
192 (allocator): Empty base class, inherit from the underlying allocator.
193 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
194 * src/allocator.cc: ...here. New. For the underlying allocators.
195 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
196 * config/linker-map.gnu: Remove __pool_alloc bits.
197 * src/Makefile.am (sources): Add allocator.cc.
198 * src/Makefile.in: Regenerate.
199 * testsuite/20_util/allocator/1.cc: Split second test into...
200 * testsuite/20_util/allocator/8230.cc: ...this.
201 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
202 typedef to use std::allocatore. Format.
203 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
205 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
206 __throw_bad_alloc calls. Don't include <memory>.
207 * include/ext/malloc_allocator.h: Remove <memory> include.
208 * include/ext/new_allocator.h (new_allocator): Same.
209 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
210 declaration. Switch __alloc to _Alloc.
211 * include/ext/hashtable.h: Remove __alloc.
212 * include/backward/alloc.h: Only inject allocator, not
213 implementation details.
215 * include/ext/mt_allocator.h: Replace free with delete.
217 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
219 * src/globals_io.cc: Change to __gnu_internal namespace.
220 * src/globals_locale.cc: Same.
221 * src/locale_init.cc: Same.
222 * src/ios_init.cc: Same.
224 2004-01-28 Stefan Olsson <stefan@snon.net>
226 * include/ext/mt_allocator.h: Replaced all malloc() calls with
227 operator new(). Added support for the env variable
228 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
229 one in allocate() as well). Fix typos.
231 2004-01-28 Paolo Carlini <pcarlini@suse.de>
233 * include/bits/basic_string.h (_S_create(size_t,
234 const _Alloc&): Change signature to take two size_type
236 * include/bits/basic_string.tcc (_S_construct(_InIterator,
237 _InIterator, const _Alloc&, input_iterator_tag)): Update
239 (_S_construct(_InIterator, _InIterator, const _Alloc&,
240 forward_iterator_tag)): Likewise.
241 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
242 (_M_mutate(size_type, size_type, size_type)): Don't
243 implement the exponential growth policy, demand it to
244 _S_create, update call and simplify.
245 (_M_clone(const _Alloc&, size_type)): Likewise.
246 (_S_create(size_type, size_type, const _Alloc&)): Implement
247 the growth policy, simplify otherwise.
249 * include/bits/basic_string.h (_Rep::operator[]): Tweak
250 signature to take a size_type, consistently with the other
253 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
255 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
256 delete declarations, add include and test variable.
258 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
260 * include/bits/codecvt.h, include/bits/locale_facets.h,
261 include/bits/postypes.h, include/bits/stl_bvector.h,
262 include/bits/stl_multiset.h, include/bits/stl_set.h,
263 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
264 include/std/std_complex.h: Document.
266 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
269 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
270 iword/pword selector.
271 (ios_base::iword, ios_base::pword): Use it.
272 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
273 iword or pword member on alloc failure.
274 * testsuite/27_io/ios_base/storage/11584.cc: New test.
276 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
277 PJ Darcy <darcypj@us.ibm.com>
279 * configure.host: Add support for *-tpf.
280 * crossconfig.m4: Likewise.
281 * configure: Regenerate.
282 * config/os/tpf: New directory.
283 * config/os/tpf/os_defines.h: New file.
284 * config/os/tpf/ctype_base.h: Likewise.
285 * config/os/tpf/ctype_inline.h: Likewise.
286 * config/os/tpf/ctype_noninline.h: Likewise.
288 2004-01-27 Paolo Carlini <pcarlini@suse.de>
291 * include/bits/sstream.tcc: Guard use of extern template.
293 2004-01-27 Paolo Carlini <pcarlini@suse.de>
295 * include/bits/basic_string.tcc
296 (basic_string(const basic_string&, size_type, size_type),
297 basic_string(const basic_string&, size_type, size_type,
298 const _Alloc&)): Avoid unnecessarily constructing iterators.
300 2004-01-26 Paolo Carlini <pcarlini@suse.de>
302 * config/locale/generic/c_locale.cc: Fix throw messages
303 to use the __N marker.
304 * config/locale/gnu/c_locale.cc: Likewise.
305 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
307 * docs/html/17_intro/C++STYLE: Likewise.
308 * include/bits/basic_ios.tcc: Likewise.
309 * include/bits/fstream.tcc: Likewise.
310 * include/bits/vector.tcc: Likewise.
311 * include/ext/ropeimpl.h: Likewise.
312 * include/std/std_bitset.h: Likewise.
313 * src/ios.cc: Likewise.
314 * src/locale.cc: Likewise.
315 * src/localename.cc: Likewise.
317 2004-01-26 Paolo Carlini <pcarlini@suse.de>
319 * include/bits/basic_string.h (_M_replace_aux): Use the
320 __N marker in throw message.
321 * include/bits/basic_string.tcc (assign(const _CharT*,
322 size_type), insert(size_type, const _CharT*, size_type),
323 replace(size_type, size_type, const _CharT*, size_type),
324 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
327 * include/bits/basic_string.h, include/bits/basic_string.tcc:
328 Fold overlong lines, minor formatting changes.
330 2004-01-26 Paolo Carlini <pcarlini@suse.de>
332 * include/bits/basic_string.h (replace(iterator, iterator,
333 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
334 (replace(iterator, iterator, const _CharT*)): Ditto.
335 (replace(iterator, iterator, const _CharT*, size_type)):
336 Add missing _GLIBCXX_DEBUG_PEDASSERT.
338 2004-01-26 Paolo Carlini <pcarlini@suse.de>
340 * include/bits/basic_string.tcc (replace(size_type,
341 size_type, const _CharT*, size_type)): Implement optimized
342 in-place algorithm for non-overlapping ranges.
343 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
344 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
346 * include/bits/basic_string.tcc (insert(size_type,
347 const _CharT*, size_type)): Tweak slightly.
349 2004-01-26 Andreas Schwab <schwab@suse.de>
351 * config/locale/gnu/monetary_members.cc: Restore locale before
352 rethrowing exception.
354 2004-01-25 Paolo Carlini <pcarlini@suse.de>
356 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
358 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
361 * include/bits/basic_string.tcc: Very minor tweaks.
363 2004-01-25 Paolo Carlini <pcarlini@suse.de>
365 * testsuite/performance/string_append.cc: Increase number
368 2004-01-25 Paolo Carlini <pcarlini@suse.de>
370 * include/bits/basic_string.h (erase(size_type, size_type),
371 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
372 instead, thus avoiding redundant check for length_error.
374 * include/bits/basic_string.h: Tweak some comments.
376 2004-01-24 Paolo Carlini <pcarlini@suse.de>
378 * include/bits/basic_string.tcc (operator+(const _CharT*,
379 const basic_string&)): No need to go through the append
380 taking two iterators.
382 2004-01-24 Paolo Carlini <pcarlini@suse.de>
384 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
385 Revert last change to use std::min: machine language is worse.
386 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
387 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
388 (find_last_not_of(_CharT, size_type)): Ditto.
390 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
391 size_type)): Discard the value returned by _M_check.
392 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
393 (append(const basic_string&, size_type, size_type)): Ditto.
394 (copy(_CharT*, size_type, size_type)): Ditto.
395 (compare(size_type, size_type, const basic_string&)): Ditto.
396 (compare(size_type, size_type, const basic_string&,
397 size_type, size_type)): Ditto.
398 (compare(size_type, size_type, const _CharT*)): Ditto.
399 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
401 2004-01-24 Paolo Carlini <pcarlini@suse.de>
403 * include/bits/basic_string.h (insert(size_type,
404 const basic_string&, size_type, size_type)): Define inline here.
405 * include/bits/basic_string.tcc (insert(size_type,
406 const basic_string&, size_type, size_type)): Move inline.
408 2004-01-24 Paolo Carlini <pcarlini@suse.de>
410 * include/bits/basic_string.h (assign(const basic_string&,
411 size_type, size_type)): Define inline here.
412 (replace(size_type, size_type, const basic_string&,
413 size_type, size_type)): Ditto.
414 (_M_replace_dispatch(iterator, iterator, _InputIterator,
415 _InputIterator, __false_type)): Only declare.
416 (_M_replace(iterator, iterator, _InputIterator,
417 _InputIterator)): Remove.
418 * include/bits/basic_string.tcc (assign(const basic_string&,
419 size_type, size_type)): Move inline.
420 (replace(size_type, size_type, const basic_string&,
421 size_type, size_type)): Ditto.
422 (_M_replace_dispatch(iterator, iterator, _InputIterator,
423 _InputIterator, __false_type)): Define, now does also what
424 _M_replace did before.
425 * src/string-inst.cc (_M_replace): Don't instantiate.
427 * include/bits/basic_string.tcc (find(const _CharT*,
428 size_type, size_type)): Tidy.
429 (rfind(_CharT, size_type)): Ditto.
430 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
431 (find_first_not_of(_CharT, size_type)): Ditto.
432 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
433 (find_last_not_of(_CharT, size_type)): Ditto.
435 2004-01-23 Paolo Carlini <pcarlini@suse.de>
438 * include/debug/bitset (operator|=): Fix typo.
439 * testsuite/23_containers/bitset/operations/13838.cc: New.
441 2004-01-23 Paolo Carlini <pcarlini@suse.de>
443 * include/bits/basic_string.tcc (insert(size_type,
444 const _CharT*, size_type __n)): Fix length_error check.
445 (replace(size_type, size_type, const _CharT*, size_type):
446 Ditto; call _M_replace_safe.
447 (_M_replace_aux(size_type, size_type, size_type, _CharT):
448 Fix length_error check.
449 (_M_replace(iterator, iterator, _InputIterator,
450 _InputIterator)): Ditto, tweak.
451 (_M_replace_safe(size_type, size_type, const _CharT*,
452 size_type)): Remove length_error check.
454 * include/bits/basic_string.tcc (append(const basic_string&),
455 append(const basic_string&, size_type, size_type)): Tweak
458 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
459 size_type)): If __n == 0 don't call traits::copy.
461 2004-01-23 Stefan Olsson <stefan@snon.net>
463 * include/ext/mt_allocator.h: Reduce lock contention.
465 2004-01-23 Paolo Carlini <pcarlini@suse.de>
468 * include/bits/fstream.tcc (underflow): Remove unused
470 * include/bits/streambuf_iterator.h (equal): Ditto.
471 * include/bits/locale_facets.h (_M_convert_from_char):
474 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
477 * config/linker-map.gnu (nan): Delete.
478 * libmath/mathconf.h (NAN, nan): Delete.
479 * linkage.m4 (nan): Don't check for it.
480 * libmath/nan.c: Delete file.
482 * config.h.in, configure: Regenerate.
484 2004-01-23 Paolo Carlini <pcarlini@suse.de>
486 * include/bits/basic_string.h (push_back(_CharT)):
488 (insert(size_type, const basic_string&)): Trivial tweak.
489 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
490 (insert(iterator, _CharT)): Ditto.
491 (erase(size_type, size_type)): Ditto.
492 (erase(iterator)): Ditto.
493 (erase(iterator, iterator)): Ditto.
494 (replace(size_type, size_type, size_type, _CharT)): Ditto.
496 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
499 * testsuite/performance/allocator_map_thread.cc: New test.
501 2004-01-22 Paolo Carlini <pcarlini@suse.de>
503 * include/bits/locale_facets.tcc
504 (money_put::do_put(..., long double)): Use the basic_string
505 constructor for char arrays, not that for C-strings, to pass
506 __digits to do_put(..., const string_type&): __ws isn't
509 2004-01-22 Paolo Carlini <pcarlini@suse.de>
511 * include/bits/basic_string.h (_M_replace_safe): Change
512 signatures to take size_types and const _CharT*.
513 (_M_replace_aux): Likewise, takes size_types instead of
515 (append(size_type, _CharT)): Update call.
516 (assign(size_type, _CharT)): Ditto.
517 (replace(iterator, iterator, size_type, _CharT)): Ditto.
518 (_M_replace_dispatch(iterator, iterator, _Integer,
519 _Integer, __true_type)): Ditto.
520 * include/bits/basic_string.tcc (assign(const _CharT*,
522 (insert(size_type, const _CharT*, size_type)): Ditto.
523 (replace(size_type, size_type, const _CharT*,
525 (_M_replace(iterator, iterator, _InputIterator,
526 _InputIterator)): Ditto.
527 (append(const basic_string&)): Ditto.
528 (append(const basic_string&, size_type, size_type): Ditto.
529 (append(const _CharT*, size_type): Ditto.
530 (_M_replace_safe, _M_replace_safe): Change definitions
531 accordingly, simplify.
532 * string-inst.cc (_M_replace_safe): Don't instantiate.
534 2004-01-21 Paolo Carlini <pcarlini@suse.de>
536 * include/bits/basic_string.tcc (append(const basic_string&)):
537 Revert previous change.
538 (append(const basic_string&, size_type, size_type)): Revert
539 previous change, use _M_check and _M_limit.
541 2004-01-21 Paolo Carlini <pcarlini@suse.de>
543 * include/bits/basic_string.h (_M_check): Change to return
544 a checked __pos and take an additional const char* argument.
545 (_M_fold): Rename to _M_limit, change to return a size_type,
546 corresponding to the __off limited to the actual length.
547 (insert(size_type, size_type, _CharT)): Update call, call
549 (insert(iterator, _CharT)): Call replace(iterator, iterator,
550 size_type, _CharT) instead.
551 (erase(size_type, size_type)): Update calls.
552 (replace(size_type, size_type, size_type, _CharT)): Ditto.
553 (substr(size_type, size_type)): Use _M_check.
554 * include/bits/basic_string.tcc (basic_string(const basic_string&,
555 size_type, size_type)): Update calls.
556 (basic_string(const basic_string&, size_type, size_type,
557 const _Alloc&)): Ditto.
558 (assign(const basic_string&, size_type, size_type)): Use the
559 new _M_check and _M_limit.
560 (insert(size_type, const basic_string&, size_type, size_type):
562 (insert(size_type, const _CharT*, size_type)): Ditto.
563 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
564 (replace(size_type, size_type, const basic_string&,
565 size_type, size_type)): Ditto.
566 (append(const basic_string&)): Ditto.
567 (append(const basic_string&, size_type, size_type)): Ditto.
568 (copy(_CharT*, size_type, size_type)): Ditto.
569 (compare(size_type, size_type, const basic_string&)): Ditto.
570 (compare(size_type, size_type, const basic_string&,size_type,
572 (compare(size_type, size_type, const _CharT*)): Ditto.
573 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
575 2004-01-19 Stefan Olsson <stefan@snon.net>
577 * include/ext/mt_allocator.h: If a thread, when it dies, still has
578 memory on it's freelist this memory is not returned to global
579 list. Simplification of deallocate so that memory is always
580 returned to the calling thread id's freelist instead of to
581 global. Fix typos. Add volatile where appropriate.
583 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
585 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
586 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
587 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
589 2004-01-19 Paolo Carlini <pcarlini@suse.de>
591 * src/debug.cc: Make sure all the names are prefixed with
592 double (or single) underscore.
594 2004-01-19 Paolo Carlini <pcarlini@suse.de>
596 * src/debug.cc: Trivial formatting change.
598 2004-01-19 Paolo Carlini <pcarlini@suse.de>
600 * include/bits/basic_string.tcc (_S_construct(size_type,
601 _CharT, const _Alloc&)): Remove redundant try/catch.
602 (_M_mutate(size_type, size_type, size_type)): Ditto.
603 (_M_clone(const _Alloc&, size_type)): Ditto.
605 2004-01-18 Paolo Carlini <pcarlini@suse.de>
607 * include/bits/basic_string.h (c_str()): Simplify, due to
608 21.3.4 the internal representation is always kept null-terminated.
609 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
610 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
611 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
614 2004-01-18 Paolo Carlini <pcarlini@suse.de>
616 * include/bits/basic_string.h (append(size_type, _CharT)):
617 Moved inline, just call _M_replace_aux, no source iterators at
618 risk of being clobbered.
619 (assign(size_type, _CharT)): Call directly _M_replace_aux.
620 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
621 input_iterator_tag)): Remove fifth unused argument.
622 (_M_replace_dispatch(iterator, iterator, _InputIterator,
623 _InputIterator, __false_type)): Update call.
624 * include/bits/basic_string.tcc (replace(size_type, size_type,
625 const _CharT*, size_type)): Update call.
626 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
627 throw string literal.
628 (_M_replace_safe(iterator, iterator, _ForwardIterator,
629 _ForwardIterator)): Likewise.
630 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
631 input_iterator_tag)): Remove fifth unused argument.
632 (append(size_type __n, _CharT __c)): Move inline.
633 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
634 const C*, const C*, input_iterator_tag)): Remove fifth unused
637 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
639 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
640 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
642 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
644 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
647 2004-01-15 Stefan Olsson <stefan@snon.net>
649 * include/ext/mt_allocator.h: Reuse thread id's as soon as
650 possible by changing the behaviour of thread_freelist to do
651 push_front when threads die instead of push_back.
653 2004-01-14 Paolo Carlini <pcarlini@suse.de>
655 * include/bits/locale_facets.h (struct __numpunct_cache):
656 Add member _M_grouping_size, caching the length of _M_grouping.
657 (__numpunct_cache<>::_M_cache): Assign the latter.
658 (__verify_grouping): Move declaration...
659 * include/bits/locale_facets.tcc (__verify_grouping):
660 ... here, change signature to take a const char* and a size_t
661 for the grouping; not a template anymore.
662 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
663 Likewise change signature and tweak consistently.
664 (num_get::_M_extract_float, num_get::_M_extract_int,
665 num_put::_M_insert_int, num_put::_M_insert_float,
666 money_get::do_get(string_type&), money_get::do_put(string_type)):
668 * config/locale/generic/numeric_members.cc
669 (numpunct<>::_M_initialize_numpunct): Assign the new member.
670 * config/locale/gnu/numeric_members.cc
671 (numpunct<>::_M_initialize_numpunct): Likewise.
672 * src/locale-inst.cc (__add_grouping): Tweak signature.
673 (__verify_grouping): Don't instantiate, not a template anymore.
675 * include/bits/locale_facets.h: Rename _M_truename_len ->
676 _M_truename_size, _M_falsename_len -> _M_falsename_size.
677 * include/bits/locale_facets.tcc: Likewise.
678 * config/locale/generic/numeric_members.cc: Likewise.
679 * config/locale/gnu/numeric_members.cc: Likewise.
681 2004-01-14 Stefan Olsson <stefan@snon.net>
683 * include/ext/mt_allocator.h: Fixups.
684 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
685 * testsuite/performance/allocator_thread.cc: Same.
687 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
689 * testsuite/performance/ifstream_extract_float.cc: Add higher
691 * testsuite/performance/ofstream_insert_float.cc: Same.
693 2004-01-13 Paolo Carlini <pcarlini@suse.de>
695 * src/locale-misc-inst.cc (__convert_from_v(long),
696 __convert_from_v(unsigned long), __convert_from_v(long long),
697 __convert_from_v(unsigned long long)): Remove, unused.
699 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
701 * testsuite/performance/ifstream_extract_float.cc: New.
702 * testsuite/performance/ofstream_insert_float.cc: Float generation
705 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
706 * 20_util/auto_ptr/1.cc: ...this.
707 * 20_util/auto_ptr/2.cc: Same.
708 * 20_util/auto_ptr/3.cc: Same.
709 * 20_util/auto_ptr/3946.cc: Same.
710 * 20_util/auto_ptr/4.cc: Same.
711 * 20_util/auto_ptr/5.cc: Same.
712 * 20_util/auto_ptr/6.cc: Same.
713 * 20_util/auto_ptr/7.cc: Same.
714 * 20_util/auto_ptr/assign_neg.cc
715 * 20_util/pairs.cc: Break into...
716 * 20_util/pair/1.cc: ...this.
717 * 20_util/pair/2.cc: Same.
718 * 20_util/pair/3.cc: Same.
719 * 20_util/pair/4.cc: Same.
721 2004-01-13 Paolo Carlini <pcarlini@suse.de>
723 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
724 Set correctly just basefield, the only group that matters.
726 2004-01-13 Paolo Carlini <pcarlini@suse.de>
728 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
729 (_Rope_rep_base): Inherit directly from the rope allocator;
730 use rebinding instead of _Alloc_traits; pick up data member
731 from _Rope_rep_alloc_base.
732 (_Rope_alloc_base): Eliminate.
733 (_Rope_base): Inherit directly from the rope allocator; use
734 rebinding instead of _Alloc_traits; pick up data member from
736 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
737 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
739 2004-01-13 Paolo Carlini <pcarlini@suse.de>
742 * include/bits/basic_string.tcc (compare(size_type, size_type,
743 const _CharT*, size_type)): Implement correctly the resolution
744 of DR 5: basically, s is a char array, -not- a C string.
745 * include/bits/basic_string.h: Tweak some comments.
746 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
747 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
749 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
751 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
754 2004-01-12 Paolo Carlini <pcarlini@suse.de>
756 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
758 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
761 2004-01-12 Paolo Carlini <pcarlini@suse.de>
763 * include/bits/locale_facets.h (struct __numpunct_cache):
764 Add members _M_truename_len and _M_falsename_len, caching
765 the lengths of _M_truename and _M_falsename.
766 (__numpunct_cache<>::_M_cache): Assign the latter.
767 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
768 num_put::do_put(bool)): Use the new members, thus avoiding
769 computing string lengths again and again.
770 * config/locale/generic/numeric_members.cc
771 (numpunct<>::_M_initialize_numpunct): Assign the new members.
772 * config/locale/gnu/numeric_members.cc
773 (numpunct<>::_M_initialize_numpunct): Likewise.
775 2004-01-12 Mark Mitchell <mark@codesourcery.com>
777 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
778 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
780 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
781 and remove Cygwin XFAIL.
782 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
783 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
784 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
785 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
787 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
788 * testsuite/27_io/objects/char/7.cc: Likewise.
789 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
790 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
791 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
793 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
795 * include/std/std_complex.h (std::complex<>::real): Return a
796 reference. Add non-const overload.
797 (std::complex<>::real): Likewise.
798 (std::real): Likewise.
799 (std::imag): Likewise.
800 (std::operator+): Tidy.
801 (std::operator-): Likewise.
802 (std::operator*): Likewise.
803 (std::operator/): Likewise.
804 (std::operator>>): Likewise.
806 2004-01-11 Paolo Carlini <pcarlini@suse.de>
809 * include/bits/fstream.tcc (imbue): Exploit the external
810 buffer to imbue 'on the fly' a new locale and convert its
811 remainder with the new codecvt facet.
812 (underflow): Tweak slightly to deal with this special case.
813 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
814 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
815 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
816 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
817 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
819 2004-01-10 Paolo Carlini <pcarlini@suse.de>
821 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
824 2004-01-10 Paolo Carlini <pcarlini@suse.de>
827 * include/bits/locale_classes.h (class locale): Fix category
829 * testsuite/22_locale/locale/13630.cc: Add.
831 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
833 * include/bits/locale_facets.h: Make a name really dependent. This
834 will be needed when Core Issue 224 is implemented.
836 2004-01-09 Paolo Carlini <pcarlini@suse.de>
838 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
839 * testsuite/performance/allocator_thread.cc: Likewise.
841 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
843 * crossconfig.m4: Add LFS, io bits to linux cross config.
844 * acconfig.h: Remove obsolete bits, reorder.
845 * config.h.in: Regenerate.
849 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
851 * include/bits/stl_list.h:
852 * include/bits/list.tc:
854 Performance enhancements for destructor, push_front(),
855 push_back(), pop_front(), pop_back(), sort()
856 Eliminated static_casts where possible.
857 Moved code out of header files into new src/list.cc
858 implementation file for library where possible.
859 Remove inheritance from iterator class and create separate
860 classes for non-constant and constant iterators.
861 * include/bits/stl_tree.h (_Rb_tree class):
863 Only erase contents in destructor.
864 Eliminate unnecessary initialization in assignment operator.
865 Optimize for the nominal case by not checking whether
866 container is empty in clear().
867 Re-order test in _M_insert() to improve performance.
868 Move initialization of new node's left & right pointers to
869 src/tree.cc to where new node's colour is initialized
870 and to reduce the amount of inline code.
871 Use _M_leftmost() and _M_end() to improve readability where
873 Create separate classes for non-constant and constant
874 iterators to clarify code, avoid extra template parameters and
875 casting away constness.
877 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
879 * src/Makefile.am (sources): Add list.cc, tree.cc.
880 * src/stl_tree.cc: Move to...
881 * src/tree.cc: ...here.
883 * config/linker-map.gnu: Tweaks.
884 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
885 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
887 * bits/stl_vector.h: Column wrap comments.
889 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
891 (re-open) PR libstdc++/12658
892 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
893 (locale::global): Likewise.
895 2004-01-07 Paolo Carlini <pcarlini@suse.de>
897 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
898 Remove redundant #include.
899 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
900 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
901 re-enable normal testing.
902 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
904 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
905 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
907 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
909 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
911 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
913 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
915 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
917 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
919 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
920 More properly, #include <locale>.
921 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
922 Remove redundant #include.
923 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
924 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
925 redundant DejaGnu directive.
926 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
929 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
930 Stefan Olsson <stefan@snon.net>
932 * scripts/check_performance: Use -pthread.
933 * testsuite/performance/allocator.cc: Tweaks, add list.
934 * testsuite/performance/allocator_thread.cc: New.
936 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
938 * include/bits/locale_facets.h: Document public classes and
940 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
943 2004-01-06 Paolo Carlini <pcarlini@suse.de>
945 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
946 Remove redundant #includes.
947 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
949 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
951 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
952 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
953 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
954 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
955 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
956 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
957 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
958 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
959 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
960 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
961 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
962 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
963 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
964 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
965 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
967 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
969 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
971 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
973 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
975 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
976 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
977 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
979 2004-01-04 Paolo Carlini <pcarlini@suse.de>
981 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
982 Remove redundant #includes.
983 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
985 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
987 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
989 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
991 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
993 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
995 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
997 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
999 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
1001 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
1003 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
1005 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
1008 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1011 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
1013 * testsuite/27_io/basic_fstream/4.cc: Likewise.
1014 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
1015 * testsuite/27_io/basic_ios/4.cc: Likewise.
1016 * testsuite/27_io/basic_iostream/4.cc: Likewise.
1017 * testsuite/27_io/basic_istream/4.cc: Likewise.
1018 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
1019 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
1020 * testsuite/27_io/basic_ostream/4.cc: Likewise.
1021 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
1022 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
1023 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
1025 2004-01-04 Paolo Carlini <pcarlini@suse.de>
1027 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
1028 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
1029 always use double underscored names.
1030 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
1032 * include/bits/locale_facets.h (struct __numpunct_cache):
1033 Dimension _M_atoms_out and _M_atoms_in one position smaller.
1034 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out