1 2004-02-01 Paolo Carlini <pcarlini@suse.de>
3 * include/bits/deque.tcc: Wrap overlong lines, constify
4 a few variables, reformat according to the coding standards.
5 * include/bits/list.tcc: Likewise.
6 * include/bits/stl_deque.h: Likewise.
7 * include/bits/stl_function.h: Likewise.
8 * include/bits/stl_iterator.h: Likewise.
9 * include/bits/stl_iterator_base_funcs.h: Likewise.
10 * include/bits/stl_iterator_base_types.h: Likewise.
11 * include/bits/stl_list.h: Likewise.
12 * include/bits/stl_map.h: Likewise.
13 * include/bits/stl_multimap.h: Likewise.
14 * include/bits/stl_multiset.h: Likewise.
15 * include/bits/stl_relops.h: Likewise.
16 * include/bits/stl_set.h: Likewise.
18 2004-02-01 Paolo Carlini <pcarlini@suse.de>
20 * include/bits/stl_bvector.h: Wrap overlong lines, constify
21 a few variables, reformat according to the coding standards.
22 * include/bits/stl_tree.h: Likewise.
24 2004-01-31 Paolo Carlini <pcarlini@suse.de>
26 * include/bits/stl_algo.h: Minor additional reformat, add
28 * include/bits/stl_algobase.h: Add copyright year.
30 2004-01-31 Paolo Carlini <pcarlini@suse.de>
32 * include/bits/stl_algo.h: Wrap overlong lines, constify
33 a few variables, reformat according to the coding standards.
34 * include/bits/stl_algobase.h: Likewise.
35 * include/bits/stl_heap.h: Likewise.
37 2004-01-31 Paolo Carlini <pcarlini@suse.de>
39 * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
41 * include/bits/basic_string.h: Fix two comments.
43 2004-01-31 Per Bothner <per@bothner.com>
45 * include/ext/mt_allocator.h
46 (__mt_alloc::_S_thread_freelist_mutex): Guard with
49 2004-01-31 Paolo Carlini <pcarlini@suse.de>
51 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
53 2004-01-30 Paolo Carlini <pcarlini@suse.de>
55 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
56 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
57 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
59 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
61 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
62 Don't use clear, but instead assign. Use insert.
64 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
66 * src/demangle.cc: Add instantiations.
67 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
68 * src/Makefile.in: Regenerate.
70 2004-01-30 David Edelsohn <edelsohn@gnu.org>
72 * src/allocator.cc: Protect _S_get_thread_id() and
73 _S_thread_key_destr() with #ifdef __GTHREADS.
75 2004-01-30 Paolo Carlini <pcarlini@suse.de>
77 Reshuffle performance testsuite.
78 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
79 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
80 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
81 fstream_seek_write.cc, ifstream_extract_float.cc,
82 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
83 list_create_fill_sort.cc, map_create_fill.cc,
84 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
85 ofstream_insert_float.cc, ofstream_insert_int.cc,
86 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
87 wchar_t_out.cc: Split into...
88 * testsuite/performance/20_util/allocator.cc: New.
89 * testsuite/performance/20_util/allocator_map_thread.cc: New.
90 * testsuite/performance/20_util/allocator_thread.cc: New.
91 * testsuite/performance/21_strings/string_append: New.
92 * testsuite/performance/22_locale/is_wchar_t.cc: New.
93 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
94 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
95 * testsuite/performance/22_locale/wchar_t_in.cc: New.
96 * testsuite/performance/22_locale/wchar_t_length.cc: New.
97 * testsuite/performance/22_locale/wchar_t_out.cc: New.
98 * testsuite/performance/23_containers/container_benchmark.cc: New.
99 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
100 * testsuite/performance/23_containers/map_create_fill.cc: New.
101 * testsuite/performance/26_numerics/complex_norm.cc: New.
102 * testsuite/performance/27_io/cout_insert_int.cc: New.
103 * testsuite/performance/27_io/filebuf_copy.cc: New.
104 * testsuite/performance/27_io/filebuf_sputc.cc: New.
105 * testsuite/performance/27_io/fstream_seek_write.cc: New.
106 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
107 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
108 * testsuite/performance/27_io/ifstream_getline.cc: New.
109 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
110 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
112 2004-01-30 Paolo Carlini <pcarlini@suse.de>
114 * include/bits/basic_string.tcc (_Rep::_S_create):
115 Never allocate a string bigger than max_size(); always keep
116 __capacity and __size in sync to avoid memory leaks at
119 2004-01-30 Paolo Carlini <pcarlini@suse.de>
121 * include/bits/basic_string.tcc (_S_construct(_InIterator,
122 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
123 the double loop, streamline.
125 * include/bits/basic_string.tcc: Very minor tweaks.
127 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
129 * scripts/check_performance: Only compile with $THREAD_FLAG
130 when test is marked to require it. Allow multiple
131 compilations/executions of marked tests.
132 * testsuite/testsuite_performance.h (report_performance):
133 Report dynamic thread support status.
134 (report_header): Likewise.
135 * testsuite/performance/allocator.cc: Stabilize iteration
136 count. Support more allocators. Mark each allocator test to
137 run and report independently.
138 * testsuite/performance/allocator_map_thread.cc: Likewise.
139 * testsuite/performance/allocator_thread.cc: Likewise.
141 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
143 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
144 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
145 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
146 std::get_temporary_buffer() instead of duplicating its code.
147 Update to C++STYLE conventions.
148 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
149 new() instead of std::malloc().
150 (return_temporary_buffer): Use ::operator delete() instead of
153 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
155 * include/bits/allocator.h: Temporary switch to new_allocator as
156 the default to unjam bootstraps.
158 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
160 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
161 * include/Makefile.in: Regenerate.
162 * include/bits/allocator_traits.h: Remove.
163 * include/bits/allocator.h: Remove allocator_traits.h include, and
165 (allocator): Empty base class, inherit from the underlying allocator.
166 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
167 * src/allocator.cc: ...here. New. For the underlying allocators.
168 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
169 * config/linker-map.gnu: Remove __pool_alloc bits.
170 * src/Makefile.am (sources): Add allocator.cc.
171 * src/Makefile.in: Regenerate.
172 * testsuite/20_util/allocator/1.cc: Split second test into...
173 * testsuite/20_util/allocator/8230.cc: ...this.
174 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
175 typedef to use std::allocatore. Format.
176 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
178 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
179 __throw_bad_alloc calls. Don't include <memory>.
180 * include/ext/malloc_allocator.h: Remove <memory> include.
181 * include/ext/new_allocator.h (new_allocator): Same.
182 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
183 declaration. Switch __alloc to _Alloc.
184 * include/ext/hashtable.h: Remove __alloc.
185 * include/backward/alloc.h: Only inject allocator, not
186 implementation details.
188 * include/ext/mt_allocator.h: Replace free with delete.
190 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
192 * src/globals_io.cc: Change to __gnu_internal namespace.
193 * src/globals_locale.cc: Same.
194 * src/locale_init.cc: Same.
195 * src/ios_init.cc: Same.
197 2004-01-28 Stefan Olsson <stefan@snon.net>
199 * include/ext/mt_allocator.h: Replaced all malloc() calls with
200 operator new(). Added support for the env variable
201 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
202 one in allocate() as well). Fix typos.
204 2004-01-28 Paolo Carlini <pcarlini@suse.de>
206 * include/bits/basic_string.h (_S_create(size_t,
207 const _Alloc&): Change signature to take two size_type
209 * include/bits/basic_string.tcc (_S_construct(_InIterator,
210 _InIterator, const _Alloc&, input_iterator_tag)): Update
212 (_S_construct(_InIterator, _InIterator, const _Alloc&,
213 forward_iterator_tag)): Likewise.
214 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
215 (_M_mutate(size_type, size_type, size_type)): Don't
216 implement the exponential growth policy, demand it to
217 _S_create, update call and simplify.
218 (_M_clone(const _Alloc&, size_type)): Likewise.
219 (_S_create(size_type, size_type, const _Alloc&)): Implement
220 the growth policy, simplify otherwise.
222 * include/bits/basic_string.h (_Rep::operator[]): Tweak
223 signature to take a size_type, consistently with the other
226 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
228 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
229 delete declarations, add include and test variable.
231 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
233 * include/bits/codecvt.h, include/bits/locale_facets.h,
234 include/bits/postypes.h, include/bits/stl_bvector.h,
235 include/bits/stl_multiset.h, include/bits/stl_set.h,
236 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
237 include/std/std_complex.h: Document.
239 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
242 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
243 iword/pword selector.
244 (ios_base::iword, ios_base::pword): Use it.
245 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
246 iword or pword member on alloc failure.
247 * testsuite/27_io/ios_base/storage/11584.cc: New test.
249 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
250 PJ Darcy <darcypj@us.ibm.com>
252 * configure.host: Add support for *-tpf.
253 * crossconfig.m4: Likewise.
254 * configure: Regenerate.
255 * config/os/tpf: New directory.
256 * config/os/tpf/os_defines.h: New file.
257 * config/os/tpf/ctype_base.h: Likewise.
258 * config/os/tpf/ctype_inline.h: Likewise.
259 * config/os/tpf/ctype_noninline.h: Likewise.
261 2004-01-27 Paolo Carlini <pcarlini@suse.de>
264 * include/bits/sstream.tcc: Guard use of extern template.
266 2004-01-27 Paolo Carlini <pcarlini@suse.de>
268 * include/bits/basic_string.tcc
269 (basic_string(const basic_string&, size_type, size_type),
270 basic_string(const basic_string&, size_type, size_type,
271 const _Alloc&)): Avoid unnecessarily constructing iterators.
273 2004-01-26 Paolo Carlini <pcarlini@suse.de>
275 * config/locale/generic/c_locale.cc: Fix throw messages
276 to use the __N marker.
277 * config/locale/gnu/c_locale.cc: Likewise.
278 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
280 * docs/html/17_intro/C++STYLE: Likewise.
281 * include/bits/basic_ios.tcc: Likewise.
282 * include/bits/fstream.tcc: Likewise.
283 * include/bits/vector.tcc: Likewise.
284 * include/ext/ropeimpl.h: Likewise.
285 * include/std/std_bitset.h: Likewise.
286 * src/ios.cc: Likewise.
287 * src/locale.cc: Likewise.
288 * src/localename.cc: Likewise.
290 2004-01-26 Paolo Carlini <pcarlini@suse.de>
292 * include/bits/basic_string.h (_M_replace_aux): Use the
293 __N marker in throw message.
294 * include/bits/basic_string.tcc (assign(const _CharT*,
295 size_type), insert(size_type, const _CharT*, size_type),
296 replace(size_type, size_type, const _CharT*, size_type),
297 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
300 * include/bits/basic_string.h, include/bits/basic_string.tcc:
301 Fold overlong lines, minor formatting changes.
303 2004-01-26 Paolo Carlini <pcarlini@suse.de>
305 * include/bits/basic_string.h (replace(iterator, iterator,
306 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
307 (replace(iterator, iterator, const _CharT*)): Ditto.
308 (replace(iterator, iterator, const _CharT*, size_type)):
309 Add missing _GLIBCXX_DEBUG_PEDASSERT.
311 2004-01-26 Paolo Carlini <pcarlini@suse.de>
313 * include/bits/basic_string.tcc (replace(size_type,
314 size_type, const _CharT*, size_type)): Implement optimized
315 in-place algorithm for non-overlapping ranges.
316 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
317 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
319 * include/bits/basic_string.tcc (insert(size_type,
320 const _CharT*, size_type)): Tweak slightly.
322 2004-01-26 Andreas Schwab <schwab@suse.de>
324 * config/locale/gnu/monetary_members.cc: Restore locale before
325 rethrowing exception.
327 2004-01-25 Paolo Carlini <pcarlini@suse.de>
329 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
331 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
334 * include/bits/basic_string.tcc: Very minor tweaks.
336 2004-01-25 Paolo Carlini <pcarlini@suse.de>
338 * testsuite/performance/string_append.cc: Increase number
341 2004-01-25 Paolo Carlini <pcarlini@suse.de>
343 * include/bits/basic_string.h (erase(size_type, size_type),
344 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
345 instead, thus avoiding redundant check for length_error.
347 * include/bits/basic_string.h: Tweak some comments.
349 2004-01-24 Paolo Carlini <pcarlini@suse.de>
351 * include/bits/basic_string.tcc (operator+(const _CharT*,
352 const basic_string&)): No need to go through the append
353 taking two iterators.
355 2004-01-24 Paolo Carlini <pcarlini@suse.de>
357 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
358 Revert last change to use std::min: machine language is worse.
359 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
360 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
361 (find_last_not_of(_CharT, size_type)): Ditto.
363 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
364 size_type)): Discard the value returned by _M_check.
365 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
366 (append(const basic_string&, size_type, size_type)): Ditto.
367 (copy(_CharT*, size_type, size_type)): Ditto.
368 (compare(size_type, size_type, const basic_string&)): Ditto.
369 (compare(size_type, size_type, const basic_string&,
370 size_type, size_type)): Ditto.
371 (compare(size_type, size_type, const _CharT*)): Ditto.
372 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
374 2004-01-24 Paolo Carlini <pcarlini@suse.de>
376 * include/bits/basic_string.h (insert(size_type,
377 const basic_string&, size_type, size_type)): Define inline here.
378 * include/bits/basic_string.tcc (insert(size_type,
379 const basic_string&, size_type, size_type)): Move inline.
381 2004-01-24 Paolo Carlini <pcarlini@suse.de>
383 * include/bits/basic_string.h (assign(const basic_string&,
384 size_type, size_type)): Define inline here.
385 (replace(size_type, size_type, const basic_string&,
386 size_type, size_type)): Ditto.
387 (_M_replace_dispatch(iterator, iterator, _InputIterator,
388 _InputIterator, __false_type)): Only declare.
389 (_M_replace(iterator, iterator, _InputIterator,
390 _InputIterator)): Remove.
391 * include/bits/basic_string.tcc (assign(const basic_string&,
392 size_type, size_type)): Move inline.
393 (replace(size_type, size_type, const basic_string&,
394 size_type, size_type)): Ditto.
395 (_M_replace_dispatch(iterator, iterator, _InputIterator,
396 _InputIterator, __false_type)): Define, now does also what
397 _M_replace did before.
398 * src/string-inst.cc (_M_replace): Don't instantiate.
400 * include/bits/basic_string.tcc (find(const _CharT*,
401 size_type, size_type)): Tidy.
402 (rfind(_CharT, size_type)): Ditto.
403 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
404 (find_first_not_of(_CharT, size_type)): Ditto.
405 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
406 (find_last_not_of(_CharT, size_type)): Ditto.
408 2004-01-23 Paolo Carlini <pcarlini@suse.de>
411 * include/debug/bitset (operator|=): Fix typo.
412 * testsuite/23_containers/bitset/operations/13838.cc: New.
414 2004-01-23 Paolo Carlini <pcarlini@suse.de>
416 * include/bits/basic_string.tcc (insert(size_type,
417 const _CharT*, size_type __n)): Fix length_error check.
418 (replace(size_type, size_type, const _CharT*, size_type):
419 Ditto; call _M_replace_safe.
420 (_M_replace_aux(size_type, size_type, size_type, _CharT):
421 Fix length_error check.
422 (_M_replace(iterator, iterator, _InputIterator,
423 _InputIterator)): Ditto, tweak.
424 (_M_replace_safe(size_type, size_type, const _CharT*,
425 size_type)): Remove length_error check.
427 * include/bits/basic_string.tcc (append(const basic_string&),
428 append(const basic_string&, size_type, size_type)): Tweak
431 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
432 size_type)): If __n == 0 don't call traits::copy.
434 2004-01-23 Stefan Olsson <stefan@snon.net>
436 * include/ext/mt_allocator.h: Reduce lock contention.
438 2004-01-23 Paolo Carlini <pcarlini@suse.de>
441 * include/bits/fstream.tcc (underflow): Remove unused
443 * include/bits/streambuf_iterator.h (equal): Ditto.
444 * include/bits/locale_facets.h (_M_convert_from_char):
447 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
450 * config/linker-map.gnu (nan): Delete.
451 * libmath/mathconf.h (NAN, nan): Delete.
452 * linkage.m4 (nan): Don't check for it.
453 * libmath/nan.c: Delete file.
455 * config.h.in, configure: Regenerate.
457 2004-01-23 Paolo Carlini <pcarlini@suse.de>
459 * include/bits/basic_string.h (push_back(_CharT)):
461 (insert(size_type, const basic_string&)): Trivial tweak.
462 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
463 (insert(iterator, _CharT)): Ditto.
464 (erase(size_type, size_type)): Ditto.
465 (erase(iterator)): Ditto.
466 (erase(iterator, iterator)): Ditto.
467 (replace(size_type, size_type, size_type, _CharT)): Ditto.
469 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
472 * testsuite/performance/allocator_map_thread.cc: New test.
474 2004-01-22 Paolo Carlini <pcarlini@suse.de>
476 * include/bits/locale_facets.tcc
477 (money_put::do_put(..., long double)): Use the basic_string
478 constructor for char arrays, not that for C-strings, to pass
479 __digits to do_put(..., const string_type&): __ws isn't
482 2004-01-22 Paolo Carlini <pcarlini@suse.de>
484 * include/bits/basic_string.h (_M_replace_safe): Change
485 signatures to take size_types and const _CharT*.
486 (_M_replace_aux): Likewise, takes size_types instead of
488 (append(size_type, _CharT)): Update call.
489 (assign(size_type, _CharT)): Ditto.
490 (replace(iterator, iterator, size_type, _CharT)): Ditto.
491 (_M_replace_dispatch(iterator, iterator, _Integer,
492 _Integer, __true_type)): Ditto.
493 * include/bits/basic_string.tcc (assign(const _CharT*,
495 (insert(size_type, const _CharT*, size_type)): Ditto.
496 (replace(size_type, size_type, const _CharT*,
498 (_M_replace(iterator, iterator, _InputIterator,
499 _InputIterator)): Ditto.
500 (append(const basic_string&)): Ditto.
501 (append(const basic_string&, size_type, size_type): Ditto.
502 (append(const _CharT*, size_type): Ditto.
503 (_M_replace_safe, _M_replace_safe): Change definitions
504 accordingly, simplify.
505 * string-inst.cc (_M_replace_safe): Don't instantiate.
507 2004-01-21 Paolo Carlini <pcarlini@suse.de>
509 * include/bits/basic_string.tcc (append(const basic_string&)):
510 Revert previous change.
511 (append(const basic_string&, size_type, size_type)): Revert
512 previous change, use _M_check and _M_limit.
514 2004-01-21 Paolo Carlini <pcarlini@suse.de>
516 * include/bits/basic_string.h (_M_check): Change to return
517 a checked __pos and take an additional const char* argument.
518 (_M_fold): Rename to _M_limit, change to return a size_type,
519 corresponding to the __off limited to the actual length.
520 (insert(size_type, size_type, _CharT)): Update call, call
522 (insert(iterator, _CharT)): Call replace(iterator, iterator,
523 size_type, _CharT) instead.
524 (erase(size_type, size_type)): Update calls.
525 (replace(size_type, size_type, size_type, _CharT)): Ditto.
526 (substr(size_type, size_type)): Use _M_check.
527 * include/bits/basic_string.tcc (basic_string(const basic_string&,
528 size_type, size_type)): Update calls.
529 (basic_string(const basic_string&, size_type, size_type,
530 const _Alloc&)): Ditto.
531 (assign(const basic_string&, size_type, size_type)): Use the
532 new _M_check and _M_limit.
533 (insert(size_type, const basic_string&, size_type, size_type):
535 (insert(size_type, const _CharT*, size_type)): Ditto.
536 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
537 (replace(size_type, size_type, const basic_string&,
538 size_type, size_type)): Ditto.
539 (append(const basic_string&)): Ditto.
540 (append(const basic_string&, size_type, size_type)): Ditto.
541 (copy(_CharT*, size_type, size_type)): Ditto.
542 (compare(size_type, size_type, const basic_string&)): Ditto.
543 (compare(size_type, size_type, const basic_string&,size_type,
545 (compare(size_type, size_type, const _CharT*)): Ditto.
546 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
548 2004-01-19 Stefan Olsson <stefan@snon.net>
550 * include/ext/mt_allocator.h: If a thread, when it dies, still has
551 memory on it's freelist this memory is not returned to global
552 list. Simplification of deallocate so that memory is always
553 returned to the calling thread id's freelist instead of to
554 global. Fix typos. Add volatile where appropriate.
556 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
558 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
559 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
560 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
562 2004-01-19 Paolo Carlini <pcarlini@suse.de>
564 * src/debug.cc: Make sure all the names are prefixed with
565 double (or single) underscore.
567 2004-01-19 Paolo Carlini <pcarlini@suse.de>
569 * src/debug.cc: Trivial formatting change.
571 2004-01-19 Paolo Carlini <pcarlini@suse.de>
573 * include/bits/basic_string.tcc (_S_construct(size_type,
574 _CharT, const _Alloc&)): Remove redundant try/catch.
575 (_M_mutate(size_type, size_type, size_type)): Ditto.
576 (_M_clone(const _Alloc&, size_type)): Ditto.
578 2004-01-18 Paolo Carlini <pcarlini@suse.de>
580 * include/bits/basic_string.h (c_str()): Simplify, due to
581 21.3.4 the internal representation is always kept null-terminated.
582 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
583 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
584 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
587 2004-01-18 Paolo Carlini <pcarlini@suse.de>
589 * include/bits/basic_string.h (append(size_type, _CharT)):
590 Moved inline, just call _M_replace_aux, no source iterators at
591 risk of being clobbered.
592 (assign(size_type, _CharT)): Call directly _M_replace_aux.
593 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
594 input_iterator_tag)): Remove fifth unused argument.
595 (_M_replace_dispatch(iterator, iterator, _InputIterator,
596 _InputIterator, __false_type)): Update call.
597 * include/bits/basic_string.tcc (replace(size_type, size_type,
598 const _CharT*, size_type)): Update call.
599 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
600 throw string literal.
601 (_M_replace_safe(iterator, iterator, _ForwardIterator,
602 _ForwardIterator)): Likewise.
603 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
604 input_iterator_tag)): Remove fifth unused argument.
605 (append(size_type __n, _CharT __c)): Move inline.
606 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
607 const C*, const C*, input_iterator_tag)): Remove fifth unused
610 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
612 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
613 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
615 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
617 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
620 2004-01-15 Stefan Olsson <stefan@snon.net>
622 * include/ext/mt_allocator.h: Reuse thread id's as soon as
623 possible by changing the behaviour of thread_freelist to do
624 push_front when threads die instead of push_back.
626 2004-01-14 Paolo Carlini <pcarlini@suse.de>
628 * include/bits/locale_facets.h (struct __numpunct_cache):
629 Add member _M_grouping_size, caching the length of _M_grouping.
630 (__numpunct_cache<>::_M_cache): Assign the latter.
631 (__verify_grouping): Move declaration...
632 * include/bits/locale_facets.tcc (__verify_grouping):
633 ... here, change signature to take a const char* and a size_t
634 for the grouping; not a template anymore.
635 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
636 Likewise change signature and tweak consistently.
637 (num_get::_M_extract_float, num_get::_M_extract_int,
638 num_put::_M_insert_int, num_put::_M_insert_float,
639 money_get::do_get(string_type&), money_get::do_put(string_type)):
641 * config/locale/generic/numeric_members.cc
642 (numpunct<>::_M_initialize_numpunct): Assign the new member.
643 * config/locale/gnu/numeric_members.cc
644 (numpunct<>::_M_initialize_numpunct): Likewise.
645 * src/locale-inst.cc (__add_grouping): Tweak signature.
646 (__verify_grouping): Don't instantiate, not a template anymore.
648 * include/bits/locale_facets.h: Rename _M_truename_len ->
649 _M_truename_size, _M_falsename_len -> _M_falsename_size.
650 * include/bits/locale_facets.tcc: Likewise.
651 * config/locale/generic/numeric_members.cc: Likewise.
652 * config/locale/gnu/numeric_members.cc: Likewise.
654 2004-01-14 Stefan Olsson <stefan@snon.net>
656 * include/ext/mt_allocator.h: Fixups.
657 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
658 * testsuite/performance/allocator_thread.cc: Same.
660 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
662 * testsuite/performance/ifstream_extract_float.cc: Add higher
664 * testsuite/performance/ofstream_insert_float.cc: Same.
666 2004-01-13 Paolo Carlini <pcarlini@suse.de>
668 * src/locale-misc-inst.cc (__convert_from_v(long),
669 __convert_from_v(unsigned long), __convert_from_v(long long),
670 __convert_from_v(unsigned long long)): Remove, unused.
672 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
674 * testsuite/performance/ifstream_extract_float.cc: New.
675 * testsuite/performance/ofstream_insert_float.cc: Float generation
678 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
679 * 20_util/auto_ptr/1.cc: ...this.
680 * 20_util/auto_ptr/2.cc: Same.
681 * 20_util/auto_ptr/3.cc: Same.
682 * 20_util/auto_ptr/3946.cc: Same.
683 * 20_util/auto_ptr/4.cc: Same.
684 * 20_util/auto_ptr/5.cc: Same.
685 * 20_util/auto_ptr/6.cc: Same.
686 * 20_util/auto_ptr/7.cc: Same.
687 * 20_util/auto_ptr/assign_neg.cc
688 * 20_util/pairs.cc: Break into...
689 * 20_util/pair/1.cc: ...this.
690 * 20_util/pair/2.cc: Same.
691 * 20_util/pair/3.cc: Same.
692 * 20_util/pair/4.cc: Same.
694 2004-01-13 Paolo Carlini <pcarlini@suse.de>
696 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
697 Set correctly just basefield, the only group that matters.
699 2004-01-13 Paolo Carlini <pcarlini@suse.de>
701 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
702 (_Rope_rep_base): Inherit directly from the rope allocator;
703 use rebinding instead of _Alloc_traits; pick up data member
704 from _Rope_rep_alloc_base.
705 (_Rope_alloc_base): Eliminate.
706 (_Rope_base): Inherit directly from the rope allocator; use
707 rebinding instead of _Alloc_traits; pick up data member from
709 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
710 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
712 2004-01-13 Paolo Carlini <pcarlini@suse.de>
715 * include/bits/basic_string.tcc (compare(size_type, size_type,
716 const _CharT*, size_type)): Implement correctly the resolution
717 of DR 5: basically, s is a char array, -not- a C string.
718 * include/bits/basic_string.h: Tweak some comments.
719 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
720 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
722 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
724 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
727 2004-01-12 Paolo Carlini <pcarlini@suse.de>
729 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
731 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
734 2004-01-12 Paolo Carlini <pcarlini@suse.de>
736 * include/bits/locale_facets.h (struct __numpunct_cache):
737 Add members _M_truename_len and _M_falsename_len, caching
738 the lengths of _M_truename and _M_falsename.
739 (__numpunct_cache<>::_M_cache): Assign the latter.
740 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
741 num_put::do_put(bool)): Use the new members, thus avoiding
742 computing string lengths again and again.
743 * config/locale/generic/numeric_members.cc
744 (numpunct<>::_M_initialize_numpunct): Assign the new members.
745 * config/locale/gnu/numeric_members.cc
746 (numpunct<>::_M_initialize_numpunct): Likewise.
748 2004-01-12 Mark Mitchell <mark@codesourcery.com>
750 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
751 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
753 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
754 and remove Cygwin XFAIL.
755 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
756 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
757 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
758 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
760 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
761 * testsuite/27_io/objects/char/7.cc: Likewise.
762 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
763 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
764 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
766 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
768 * include/std/std_complex.h (std::complex<>::real): Return a
769 reference. Add non-const overload.
770 (std::complex<>::real): Likewise.
771 (std::real): Likewise.
772 (std::imag): Likewise.
773 (std::operator+): Tidy.
774 (std::operator-): Likewise.
775 (std::operator*): Likewise.
776 (std::operator/): Likewise.
777 (std::operator>>): Likewise.
779 2004-01-11 Paolo Carlini <pcarlini@suse.de>
782 * include/bits/fstream.tcc (imbue): Exploit the external
783 buffer to imbue 'on the fly' a new locale and convert its
784 remainder with the new codecvt facet.
785 (underflow): Tweak slightly to deal with this special case.
786 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
787 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
788 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
789 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
790 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
792 2004-01-10 Paolo Carlini <pcarlini@suse.de>
794 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
797 2004-01-10 Paolo Carlini <pcarlini@suse.de>
800 * include/bits/locale_classes.h (class locale): Fix category
802 * testsuite/22_locale/locale/13630.cc: Add.
804 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
806 * include/bits/locale_facets.h: Make a name really dependent. This
807 will be needed when Core Issue 224 is implemented.
809 2004-01-09 Paolo Carlini <pcarlini@suse.de>
811 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
812 * testsuite/performance/allocator_thread.cc: Likewise.
814 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
816 * crossconfig.m4: Add LFS, io bits to linux cross config.
817 * acconfig.h: Remove obsolete bits, reorder.
818 * config.h.in: Regenerate.
822 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
824 * include/bits/stl_list.h:
825 * include/bits/list.tc:
827 Performance enhancements for destructor, push_front(),
828 push_back(), pop_front(), pop_back(), sort()
829 Eliminated static_casts where possible.
830 Moved code out of header files into new src/list.cc
831 implementation file for library where possible.
832 Remove inheritance from iterator class and create separate
833 classes for non-constant and constant iterators.
834 * include/bits/stl_tree.h (_Rb_tree class):
836 Only erase contents in destructor.
837 Eliminate unnecessary initialization in assignment operator.
838 Optimize for the nominal case by not checking whether
839 container is empty in clear().
840 Re-order test in _M_insert() to improve performance.
841 Move initialization of new node's left & right pointers to
842 src/tree.cc to where new node's colour is initialized
843 and to reduce the amount of inline code.
844 Use _M_leftmost() and _M_end() to improve readability where
846 Create separate classes for non-constant and constant
847 iterators to clarify code, avoid extra template parameters and
848 casting away constness.
850 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
852 * src/Makefile.am (sources): Add list.cc, tree.cc.
853 * src/stl_tree.cc: Move to...
854 * src/tree.cc: ...here.
856 * config/linker-map.gnu: Tweaks.
857 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
858 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
860 * bits/stl_vector.h: Column wrap comments.
862 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
864 (re-open) PR libstdc++/12658
865 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
866 (locale::global): Likewise.
868 2004-01-07 Paolo Carlini <pcarlini@suse.de>
870 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
871 Remove redundant #include.
872 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
873 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
874 re-enable normal testing.
875 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
877 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
878 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
880 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
882 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
884 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
886 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
888 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
890 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
892 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
893 More properly, #include <locale>.
894 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
895 Remove redundant #include.
896 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
897 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
898 redundant DejaGnu directive.
899 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
902 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
903 Stefan Olsson <stefan@snon.net>
905 * scripts/check_performance: Use -pthread.
906 * testsuite/performance/allocator.cc: Tweaks, add list.
907 * testsuite/performance/allocator_thread.cc: New.
909 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
911 * include/bits/locale_facets.h: Document public classes and
913 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
916 2004-01-06 Paolo Carlini <pcarlini@suse.de>
918 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
919 Remove redundant #includes.
920 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
922 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
924 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
925 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
926 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
927 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
928 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
929 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
930 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
931 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
932 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
933 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
934 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
935 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
936 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
937 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
938 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
940 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
942 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
944 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
946 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
948 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
949 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
950 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
952 2004-01-04 Paolo Carlini <pcarlini@suse.de>
954 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
955 Remove redundant #includes.
956 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
958 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
960 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
962 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
964 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
966 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
968 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
970 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
972 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
974 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
976 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
978 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
981 2004-01-04 Mark Mitchell <mark@codesourcery.com>
984 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
986 * testsuite/27_io/basic_fstream/4.cc: Likewise.
987 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
988 * testsuite/27_io/basic_ios/4.cc: Likewise.
989 * testsuite/27_io/basic_iostream/4.cc: Likewise.
990 * testsuite/27_io/basic_istream/4.cc: Likewise.
991 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
992 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
993 * testsuite/27_io/basic_ostream/4.cc: Likewise.
994 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
995 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
996 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
998 2004-01-04 Paolo Carlini <pcarlini@suse.de>
1000 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
1001 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
1002 always use double underscored names.
1003 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
1005 * include/bits/locale_facets.h (struct __numpunct_cache):
1006 Dimension _M_atoms_out and _M_atoms_in one position smaller.
1007 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out