1 2004-02-01 Paolo Carlini <pcarlini@suse.de>
3 * include/bits/stl_function.h: Additional minor tweaks.
5 2004-02-01 Paolo Carlini <pcarlini@suse.de>
7 * include/bits/deque.tcc: Wrap overlong lines, constify
8 a few variables, reformat according to the coding standards.
9 * include/bits/list.tcc: Likewise.
10 * include/bits/stl_deque.h: Likewise.
11 * include/bits/stl_function.h: Likewise.
12 * include/bits/stl_iterator.h: Likewise.
13 * include/bits/stl_iterator_base_funcs.h: Likewise.
14 * include/bits/stl_iterator_base_types.h: Likewise.
15 * include/bits/stl_list.h: Likewise.
16 * include/bits/stl_map.h: Likewise.
17 * include/bits/stl_multimap.h: Likewise.
18 * include/bits/stl_multiset.h: Likewise.
19 * include/bits/stl_relops.h: Likewise.
20 * include/bits/stl_set.h: Likewise.
22 2004-02-01 Paolo Carlini <pcarlini@suse.de>
24 * include/bits/stl_bvector.h: Wrap overlong lines, constify
25 a few variables, reformat according to the coding standards.
26 * include/bits/stl_tree.h: Likewise.
28 2004-01-31 Paolo Carlini <pcarlini@suse.de>
30 * include/bits/stl_algo.h: Minor additional reformat, add
32 * include/bits/stl_algobase.h: Add copyright year.
34 2004-01-31 Paolo Carlini <pcarlini@suse.de>
36 * include/bits/stl_algo.h: Wrap overlong lines, constify
37 a few variables, reformat according to the coding standards.
38 * include/bits/stl_algobase.h: Likewise.
39 * include/bits/stl_heap.h: Likewise.
41 2004-01-31 Paolo Carlini <pcarlini@suse.de>
43 * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
45 * include/bits/basic_string.h: Fix two comments.
47 2004-01-31 Per Bothner <per@bothner.com>
49 * include/ext/mt_allocator.h
50 (__mt_alloc::_S_thread_freelist_mutex): Guard with
53 2004-01-31 Paolo Carlini <pcarlini@suse.de>
55 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
57 2004-01-30 Paolo Carlini <pcarlini@suse.de>
59 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
60 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
61 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
63 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
65 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
66 Don't use clear, but instead assign. Use insert.
68 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
70 * src/demangle.cc: Add instantiations.
71 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
72 * src/Makefile.in: Regenerate.
74 2004-01-30 David Edelsohn <edelsohn@gnu.org>
76 * src/allocator.cc: Protect _S_get_thread_id() and
77 _S_thread_key_destr() with #ifdef __GTHREADS.
79 2004-01-30 Paolo Carlini <pcarlini@suse.de>
81 Reshuffle performance testsuite.
82 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
83 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
84 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
85 fstream_seek_write.cc, ifstream_extract_float.cc,
86 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
87 list_create_fill_sort.cc, map_create_fill.cc,
88 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
89 ofstream_insert_float.cc, ofstream_insert_int.cc,
90 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
91 wchar_t_out.cc: Split into...
92 * testsuite/performance/20_util/allocator.cc: New.
93 * testsuite/performance/20_util/allocator_map_thread.cc: New.
94 * testsuite/performance/20_util/allocator_thread.cc: New.
95 * testsuite/performance/21_strings/string_append: New.
96 * testsuite/performance/22_locale/is_wchar_t.cc: New.
97 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
98 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
99 * testsuite/performance/22_locale/wchar_t_in.cc: New.
100 * testsuite/performance/22_locale/wchar_t_length.cc: New.
101 * testsuite/performance/22_locale/wchar_t_out.cc: New.
102 * testsuite/performance/23_containers/container_benchmark.cc: New.
103 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
104 * testsuite/performance/23_containers/map_create_fill.cc: New.
105 * testsuite/performance/26_numerics/complex_norm.cc: New.
106 * testsuite/performance/27_io/cout_insert_int.cc: New.
107 * testsuite/performance/27_io/filebuf_copy.cc: New.
108 * testsuite/performance/27_io/filebuf_sputc.cc: New.
109 * testsuite/performance/27_io/fstream_seek_write.cc: New.
110 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
111 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
112 * testsuite/performance/27_io/ifstream_getline.cc: New.
113 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
114 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
116 2004-01-30 Paolo Carlini <pcarlini@suse.de>
118 * include/bits/basic_string.tcc (_Rep::_S_create):
119 Never allocate a string bigger than max_size(); always keep
120 __capacity and __size in sync to avoid memory leaks at
123 2004-01-30 Paolo Carlini <pcarlini@suse.de>
125 * include/bits/basic_string.tcc (_S_construct(_InIterator,
126 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
127 the double loop, streamline.
129 * include/bits/basic_string.tcc: Very minor tweaks.
131 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
133 * scripts/check_performance: Only compile with $THREAD_FLAG
134 when test is marked to require it. Allow multiple
135 compilations/executions of marked tests.
136 * testsuite/testsuite_performance.h (report_performance):
137 Report dynamic thread support status.
138 (report_header): Likewise.
139 * testsuite/performance/allocator.cc: Stabilize iteration
140 count. Support more allocators. Mark each allocator test to
141 run and report independently.
142 * testsuite/performance/allocator_map_thread.cc: Likewise.
143 * testsuite/performance/allocator_thread.cc: Likewise.
145 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
147 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
148 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
149 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
150 std::get_temporary_buffer() instead of duplicating its code.
151 Update to C++STYLE conventions.
152 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
153 new() instead of std::malloc().
154 (return_temporary_buffer): Use ::operator delete() instead of
157 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
159 * include/bits/allocator.h: Temporary switch to new_allocator as
160 the default to unjam bootstraps.
162 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
164 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
165 * include/Makefile.in: Regenerate.
166 * include/bits/allocator_traits.h: Remove.
167 * include/bits/allocator.h: Remove allocator_traits.h include, and
169 (allocator): Empty base class, inherit from the underlying allocator.
170 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
171 * src/allocator.cc: ...here. New. For the underlying allocators.
172 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
173 * config/linker-map.gnu: Remove __pool_alloc bits.
174 * src/Makefile.am (sources): Add allocator.cc.
175 * src/Makefile.in: Regenerate.
176 * testsuite/20_util/allocator/1.cc: Split second test into...
177 * testsuite/20_util/allocator/8230.cc: ...this.
178 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
179 typedef to use std::allocatore. Format.
180 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
182 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
183 __throw_bad_alloc calls. Don't include <memory>.
184 * include/ext/malloc_allocator.h: Remove <memory> include.
185 * include/ext/new_allocator.h (new_allocator): Same.
186 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
187 declaration. Switch __alloc to _Alloc.
188 * include/ext/hashtable.h: Remove __alloc.
189 * include/backward/alloc.h: Only inject allocator, not
190 implementation details.
192 * include/ext/mt_allocator.h: Replace free with delete.
194 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
196 * src/globals_io.cc: Change to __gnu_internal namespace.
197 * src/globals_locale.cc: Same.
198 * src/locale_init.cc: Same.
199 * src/ios_init.cc: Same.
201 2004-01-28 Stefan Olsson <stefan@snon.net>
203 * include/ext/mt_allocator.h: Replaced all malloc() calls with
204 operator new(). Added support for the env variable
205 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
206 one in allocate() as well). Fix typos.
208 2004-01-28 Paolo Carlini <pcarlini@suse.de>
210 * include/bits/basic_string.h (_S_create(size_t,
211 const _Alloc&): Change signature to take two size_type
213 * include/bits/basic_string.tcc (_S_construct(_InIterator,
214 _InIterator, const _Alloc&, input_iterator_tag)): Update
216 (_S_construct(_InIterator, _InIterator, const _Alloc&,
217 forward_iterator_tag)): Likewise.
218 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
219 (_M_mutate(size_type, size_type, size_type)): Don't
220 implement the exponential growth policy, demand it to
221 _S_create, update call and simplify.
222 (_M_clone(const _Alloc&, size_type)): Likewise.
223 (_S_create(size_type, size_type, const _Alloc&)): Implement
224 the growth policy, simplify otherwise.
226 * include/bits/basic_string.h (_Rep::operator[]): Tweak
227 signature to take a size_type, consistently with the other
230 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
232 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
233 delete declarations, add include and test variable.
235 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
237 * include/bits/codecvt.h, include/bits/locale_facets.h,
238 include/bits/postypes.h, include/bits/stl_bvector.h,
239 include/bits/stl_multiset.h, include/bits/stl_set.h,
240 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
241 include/std/std_complex.h: Document.
243 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
246 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
247 iword/pword selector.
248 (ios_base::iword, ios_base::pword): Use it.
249 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
250 iword or pword member on alloc failure.
251 * testsuite/27_io/ios_base/storage/11584.cc: New test.
253 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
254 PJ Darcy <darcypj@us.ibm.com>
256 * configure.host: Add support for *-tpf.
257 * crossconfig.m4: Likewise.
258 * configure: Regenerate.
259 * config/os/tpf: New directory.
260 * config/os/tpf/os_defines.h: New file.
261 * config/os/tpf/ctype_base.h: Likewise.
262 * config/os/tpf/ctype_inline.h: Likewise.
263 * config/os/tpf/ctype_noninline.h: Likewise.
265 2004-01-27 Paolo Carlini <pcarlini@suse.de>
268 * include/bits/sstream.tcc: Guard use of extern template.
270 2004-01-27 Paolo Carlini <pcarlini@suse.de>
272 * include/bits/basic_string.tcc
273 (basic_string(const basic_string&, size_type, size_type),
274 basic_string(const basic_string&, size_type, size_type,
275 const _Alloc&)): Avoid unnecessarily constructing iterators.
277 2004-01-26 Paolo Carlini <pcarlini@suse.de>
279 * config/locale/generic/c_locale.cc: Fix throw messages
280 to use the __N marker.
281 * config/locale/gnu/c_locale.cc: Likewise.
282 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
284 * docs/html/17_intro/C++STYLE: Likewise.
285 * include/bits/basic_ios.tcc: Likewise.
286 * include/bits/fstream.tcc: Likewise.
287 * include/bits/vector.tcc: Likewise.
288 * include/ext/ropeimpl.h: Likewise.
289 * include/std/std_bitset.h: Likewise.
290 * src/ios.cc: Likewise.
291 * src/locale.cc: Likewise.
292 * src/localename.cc: Likewise.
294 2004-01-26 Paolo Carlini <pcarlini@suse.de>
296 * include/bits/basic_string.h (_M_replace_aux): Use the
297 __N marker in throw message.
298 * include/bits/basic_string.tcc (assign(const _CharT*,
299 size_type), insert(size_type, const _CharT*, size_type),
300 replace(size_type, size_type, const _CharT*, size_type),
301 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
304 * include/bits/basic_string.h, include/bits/basic_string.tcc:
305 Fold overlong lines, minor formatting changes.
307 2004-01-26 Paolo Carlini <pcarlini@suse.de>
309 * include/bits/basic_string.h (replace(iterator, iterator,
310 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
311 (replace(iterator, iterator, const _CharT*)): Ditto.
312 (replace(iterator, iterator, const _CharT*, size_type)):
313 Add missing _GLIBCXX_DEBUG_PEDASSERT.
315 2004-01-26 Paolo Carlini <pcarlini@suse.de>
317 * include/bits/basic_string.tcc (replace(size_type,
318 size_type, const _CharT*, size_type)): Implement optimized
319 in-place algorithm for non-overlapping ranges.
320 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
321 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
323 * include/bits/basic_string.tcc (insert(size_type,
324 const _CharT*, size_type)): Tweak slightly.
326 2004-01-26 Andreas Schwab <schwab@suse.de>
328 * config/locale/gnu/monetary_members.cc: Restore locale before
329 rethrowing exception.
331 2004-01-25 Paolo Carlini <pcarlini@suse.de>
333 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
335 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
338 * include/bits/basic_string.tcc: Very minor tweaks.
340 2004-01-25 Paolo Carlini <pcarlini@suse.de>
342 * testsuite/performance/string_append.cc: Increase number
345 2004-01-25 Paolo Carlini <pcarlini@suse.de>
347 * include/bits/basic_string.h (erase(size_type, size_type),
348 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
349 instead, thus avoiding redundant check for length_error.
351 * include/bits/basic_string.h: Tweak some comments.
353 2004-01-24 Paolo Carlini <pcarlini@suse.de>
355 * include/bits/basic_string.tcc (operator+(const _CharT*,
356 const basic_string&)): No need to go through the append
357 taking two iterators.
359 2004-01-24 Paolo Carlini <pcarlini@suse.de>
361 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
362 Revert last change to use std::min: machine language is worse.
363 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
364 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
365 (find_last_not_of(_CharT, size_type)): Ditto.
367 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
368 size_type)): Discard the value returned by _M_check.
369 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
370 (append(const basic_string&, size_type, size_type)): Ditto.
371 (copy(_CharT*, size_type, size_type)): Ditto.
372 (compare(size_type, size_type, const basic_string&)): Ditto.
373 (compare(size_type, size_type, const basic_string&,
374 size_type, size_type)): Ditto.
375 (compare(size_type, size_type, const _CharT*)): Ditto.
376 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
378 2004-01-24 Paolo Carlini <pcarlini@suse.de>
380 * include/bits/basic_string.h (insert(size_type,
381 const basic_string&, size_type, size_type)): Define inline here.
382 * include/bits/basic_string.tcc (insert(size_type,
383 const basic_string&, size_type, size_type)): Move inline.
385 2004-01-24 Paolo Carlini <pcarlini@suse.de>
387 * include/bits/basic_string.h (assign(const basic_string&,
388 size_type, size_type)): Define inline here.
389 (replace(size_type, size_type, const basic_string&,
390 size_type, size_type)): Ditto.
391 (_M_replace_dispatch(iterator, iterator, _InputIterator,
392 _InputIterator, __false_type)): Only declare.
393 (_M_replace(iterator, iterator, _InputIterator,
394 _InputIterator)): Remove.
395 * include/bits/basic_string.tcc (assign(const basic_string&,
396 size_type, size_type)): Move inline.
397 (replace(size_type, size_type, const basic_string&,
398 size_type, size_type)): Ditto.
399 (_M_replace_dispatch(iterator, iterator, _InputIterator,
400 _InputIterator, __false_type)): Define, now does also what
401 _M_replace did before.
402 * src/string-inst.cc (_M_replace): Don't instantiate.
404 * include/bits/basic_string.tcc (find(const _CharT*,
405 size_type, size_type)): Tidy.
406 (rfind(_CharT, size_type)): Ditto.
407 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
408 (find_first_not_of(_CharT, size_type)): Ditto.
409 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
410 (find_last_not_of(_CharT, size_type)): Ditto.
412 2004-01-23 Paolo Carlini <pcarlini@suse.de>
415 * include/debug/bitset (operator|=): Fix typo.
416 * testsuite/23_containers/bitset/operations/13838.cc: New.
418 2004-01-23 Paolo Carlini <pcarlini@suse.de>
420 * include/bits/basic_string.tcc (insert(size_type,
421 const _CharT*, size_type __n)): Fix length_error check.
422 (replace(size_type, size_type, const _CharT*, size_type):
423 Ditto; call _M_replace_safe.
424 (_M_replace_aux(size_type, size_type, size_type, _CharT):
425 Fix length_error check.
426 (_M_replace(iterator, iterator, _InputIterator,
427 _InputIterator)): Ditto, tweak.
428 (_M_replace_safe(size_type, size_type, const _CharT*,
429 size_type)): Remove length_error check.
431 * include/bits/basic_string.tcc (append(const basic_string&),
432 append(const basic_string&, size_type, size_type)): Tweak
435 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
436 size_type)): If __n == 0 don't call traits::copy.
438 2004-01-23 Stefan Olsson <stefan@snon.net>
440 * include/ext/mt_allocator.h: Reduce lock contention.
442 2004-01-23 Paolo Carlini <pcarlini@suse.de>
445 * include/bits/fstream.tcc (underflow): Remove unused
447 * include/bits/streambuf_iterator.h (equal): Ditto.
448 * include/bits/locale_facets.h (_M_convert_from_char):
451 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
454 * config/linker-map.gnu (nan): Delete.
455 * libmath/mathconf.h (NAN, nan): Delete.
456 * linkage.m4 (nan): Don't check for it.
457 * libmath/nan.c: Delete file.
459 * config.h.in, configure: Regenerate.
461 2004-01-23 Paolo Carlini <pcarlini@suse.de>
463 * include/bits/basic_string.h (push_back(_CharT)):
465 (insert(size_type, const basic_string&)): Trivial tweak.
466 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
467 (insert(iterator, _CharT)): Ditto.
468 (erase(size_type, size_type)): Ditto.
469 (erase(iterator)): Ditto.
470 (erase(iterator, iterator)): Ditto.
471 (replace(size_type, size_type, size_type, _CharT)): Ditto.
473 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
476 * testsuite/performance/allocator_map_thread.cc: New test.
478 2004-01-22 Paolo Carlini <pcarlini@suse.de>
480 * include/bits/locale_facets.tcc
481 (money_put::do_put(..., long double)): Use the basic_string
482 constructor for char arrays, not that for C-strings, to pass
483 __digits to do_put(..., const string_type&): __ws isn't
486 2004-01-22 Paolo Carlini <pcarlini@suse.de>
488 * include/bits/basic_string.h (_M_replace_safe): Change
489 signatures to take size_types and const _CharT*.
490 (_M_replace_aux): Likewise, takes size_types instead of
492 (append(size_type, _CharT)): Update call.
493 (assign(size_type, _CharT)): Ditto.
494 (replace(iterator, iterator, size_type, _CharT)): Ditto.
495 (_M_replace_dispatch(iterator, iterator, _Integer,
496 _Integer, __true_type)): Ditto.
497 * include/bits/basic_string.tcc (assign(const _CharT*,
499 (insert(size_type, const _CharT*, size_type)): Ditto.
500 (replace(size_type, size_type, const _CharT*,
502 (_M_replace(iterator, iterator, _InputIterator,
503 _InputIterator)): Ditto.
504 (append(const basic_string&)): Ditto.
505 (append(const basic_string&, size_type, size_type): Ditto.
506 (append(const _CharT*, size_type): Ditto.
507 (_M_replace_safe, _M_replace_safe): Change definitions
508 accordingly, simplify.
509 * string-inst.cc (_M_replace_safe): Don't instantiate.
511 2004-01-21 Paolo Carlini <pcarlini@suse.de>
513 * include/bits/basic_string.tcc (append(const basic_string&)):
514 Revert previous change.
515 (append(const basic_string&, size_type, size_type)): Revert
516 previous change, use _M_check and _M_limit.
518 2004-01-21 Paolo Carlini <pcarlini@suse.de>
520 * include/bits/basic_string.h (_M_check): Change to return
521 a checked __pos and take an additional const char* argument.
522 (_M_fold): Rename to _M_limit, change to return a size_type,
523 corresponding to the __off limited to the actual length.
524 (insert(size_type, size_type, _CharT)): Update call, call
526 (insert(iterator, _CharT)): Call replace(iterator, iterator,
527 size_type, _CharT) instead.
528 (erase(size_type, size_type)): Update calls.
529 (replace(size_type, size_type, size_type, _CharT)): Ditto.
530 (substr(size_type, size_type)): Use _M_check.
531 * include/bits/basic_string.tcc (basic_string(const basic_string&,
532 size_type, size_type)): Update calls.
533 (basic_string(const basic_string&, size_type, size_type,
534 const _Alloc&)): Ditto.
535 (assign(const basic_string&, size_type, size_type)): Use the
536 new _M_check and _M_limit.
537 (insert(size_type, const basic_string&, size_type, size_type):
539 (insert(size_type, const _CharT*, size_type)): Ditto.
540 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
541 (replace(size_type, size_type, const basic_string&,
542 size_type, size_type)): Ditto.
543 (append(const basic_string&)): Ditto.
544 (append(const basic_string&, size_type, size_type)): Ditto.
545 (copy(_CharT*, size_type, size_type)): Ditto.
546 (compare(size_type, size_type, const basic_string&)): Ditto.
547 (compare(size_type, size_type, const basic_string&,size_type,
549 (compare(size_type, size_type, const _CharT*)): Ditto.
550 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
552 2004-01-19 Stefan Olsson <stefan@snon.net>
554 * include/ext/mt_allocator.h: If a thread, when it dies, still has
555 memory on it's freelist this memory is not returned to global
556 list. Simplification of deallocate so that memory is always
557 returned to the calling thread id's freelist instead of to
558 global. Fix typos. Add volatile where appropriate.
560 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
562 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
563 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
564 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
566 2004-01-19 Paolo Carlini <pcarlini@suse.de>
568 * src/debug.cc: Make sure all the names are prefixed with
569 double (or single) underscore.
571 2004-01-19 Paolo Carlini <pcarlini@suse.de>
573 * src/debug.cc: Trivial formatting change.
575 2004-01-19 Paolo Carlini <pcarlini@suse.de>
577 * include/bits/basic_string.tcc (_S_construct(size_type,
578 _CharT, const _Alloc&)): Remove redundant try/catch.
579 (_M_mutate(size_type, size_type, size_type)): Ditto.
580 (_M_clone(const _Alloc&, size_type)): Ditto.
582 2004-01-18 Paolo Carlini <pcarlini@suse.de>
584 * include/bits/basic_string.h (c_str()): Simplify, due to
585 21.3.4 the internal representation is always kept null-terminated.
586 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
587 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
588 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
591 2004-01-18 Paolo Carlini <pcarlini@suse.de>
593 * include/bits/basic_string.h (append(size_type, _CharT)):
594 Moved inline, just call _M_replace_aux, no source iterators at
595 risk of being clobbered.
596 (assign(size_type, _CharT)): Call directly _M_replace_aux.
597 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
598 input_iterator_tag)): Remove fifth unused argument.
599 (_M_replace_dispatch(iterator, iterator, _InputIterator,
600 _InputIterator, __false_type)): Update call.
601 * include/bits/basic_string.tcc (replace(size_type, size_type,
602 const _CharT*, size_type)): Update call.
603 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
604 throw string literal.
605 (_M_replace_safe(iterator, iterator, _ForwardIterator,
606 _ForwardIterator)): Likewise.
607 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
608 input_iterator_tag)): Remove fifth unused argument.
609 (append(size_type __n, _CharT __c)): Move inline.
610 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
611 const C*, const C*, input_iterator_tag)): Remove fifth unused
614 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
616 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
617 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
619 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
621 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
624 2004-01-15 Stefan Olsson <stefan@snon.net>
626 * include/ext/mt_allocator.h: Reuse thread id's as soon as
627 possible by changing the behaviour of thread_freelist to do
628 push_front when threads die instead of push_back.
630 2004-01-14 Paolo Carlini <pcarlini@suse.de>
632 * include/bits/locale_facets.h (struct __numpunct_cache):
633 Add member _M_grouping_size, caching the length of _M_grouping.
634 (__numpunct_cache<>::_M_cache): Assign the latter.
635 (__verify_grouping): Move declaration...
636 * include/bits/locale_facets.tcc (__verify_grouping):
637 ... here, change signature to take a const char* and a size_t
638 for the grouping; not a template anymore.
639 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
640 Likewise change signature and tweak consistently.
641 (num_get::_M_extract_float, num_get::_M_extract_int,
642 num_put::_M_insert_int, num_put::_M_insert_float,
643 money_get::do_get(string_type&), money_get::do_put(string_type)):
645 * config/locale/generic/numeric_members.cc
646 (numpunct<>::_M_initialize_numpunct): Assign the new member.
647 * config/locale/gnu/numeric_members.cc
648 (numpunct<>::_M_initialize_numpunct): Likewise.
649 * src/locale-inst.cc (__add_grouping): Tweak signature.
650 (__verify_grouping): Don't instantiate, not a template anymore.
652 * include/bits/locale_facets.h: Rename _M_truename_len ->
653 _M_truename_size, _M_falsename_len -> _M_falsename_size.
654 * include/bits/locale_facets.tcc: Likewise.
655 * config/locale/generic/numeric_members.cc: Likewise.
656 * config/locale/gnu/numeric_members.cc: Likewise.
658 2004-01-14 Stefan Olsson <stefan@snon.net>
660 * include/ext/mt_allocator.h: Fixups.
661 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
662 * testsuite/performance/allocator_thread.cc: Same.
664 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
666 * testsuite/performance/ifstream_extract_float.cc: Add higher
668 * testsuite/performance/ofstream_insert_float.cc: Same.
670 2004-01-13 Paolo Carlini <pcarlini@suse.de>
672 * src/locale-misc-inst.cc (__convert_from_v(long),
673 __convert_from_v(unsigned long), __convert_from_v(long long),
674 __convert_from_v(unsigned long long)): Remove, unused.
676 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
678 * testsuite/performance/ifstream_extract_float.cc: New.
679 * testsuite/performance/ofstream_insert_float.cc: Float generation
682 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
683 * 20_util/auto_ptr/1.cc: ...this.
684 * 20_util/auto_ptr/2.cc: Same.
685 * 20_util/auto_ptr/3.cc: Same.
686 * 20_util/auto_ptr/3946.cc: Same.
687 * 20_util/auto_ptr/4.cc: Same.
688 * 20_util/auto_ptr/5.cc: Same.
689 * 20_util/auto_ptr/6.cc: Same.
690 * 20_util/auto_ptr/7.cc: Same.
691 * 20_util/auto_ptr/assign_neg.cc
692 * 20_util/pairs.cc: Break into...
693 * 20_util/pair/1.cc: ...this.
694 * 20_util/pair/2.cc: Same.
695 * 20_util/pair/3.cc: Same.
696 * 20_util/pair/4.cc: Same.
698 2004-01-13 Paolo Carlini <pcarlini@suse.de>
700 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
701 Set correctly just basefield, the only group that matters.
703 2004-01-13 Paolo Carlini <pcarlini@suse.de>
705 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
706 (_Rope_rep_base): Inherit directly from the rope allocator;
707 use rebinding instead of _Alloc_traits; pick up data member
708 from _Rope_rep_alloc_base.
709 (_Rope_alloc_base): Eliminate.
710 (_Rope_base): Inherit directly from the rope allocator; use
711 rebinding instead of _Alloc_traits; pick up data member from
713 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
714 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
716 2004-01-13 Paolo Carlini <pcarlini@suse.de>
719 * include/bits/basic_string.tcc (compare(size_type, size_type,
720 const _CharT*, size_type)): Implement correctly the resolution
721 of DR 5: basically, s is a char array, -not- a C string.
722 * include/bits/basic_string.h: Tweak some comments.
723 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
724 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
726 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
728 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
731 2004-01-12 Paolo Carlini <pcarlini@suse.de>
733 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
735 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
738 2004-01-12 Paolo Carlini <pcarlini@suse.de>
740 * include/bits/locale_facets.h (struct __numpunct_cache):
741 Add members _M_truename_len and _M_falsename_len, caching
742 the lengths of _M_truename and _M_falsename.
743 (__numpunct_cache<>::_M_cache): Assign the latter.
744 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
745 num_put::do_put(bool)): Use the new members, thus avoiding
746 computing string lengths again and again.
747 * config/locale/generic/numeric_members.cc
748 (numpunct<>::_M_initialize_numpunct): Assign the new members.
749 * config/locale/gnu/numeric_members.cc
750 (numpunct<>::_M_initialize_numpunct): Likewise.
752 2004-01-12 Mark Mitchell <mark@codesourcery.com>
754 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
755 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
757 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
758 and remove Cygwin XFAIL.
759 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
760 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
761 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
762 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
764 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
765 * testsuite/27_io/objects/char/7.cc: Likewise.
766 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
767 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
768 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
770 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
772 * include/std/std_complex.h (std::complex<>::real): Return a
773 reference. Add non-const overload.
774 (std::complex<>::real): Likewise.
775 (std::real): Likewise.
776 (std::imag): Likewise.
777 (std::operator+): Tidy.
778 (std::operator-): Likewise.
779 (std::operator*): Likewise.
780 (std::operator/): Likewise.
781 (std::operator>>): Likewise.
783 2004-01-11 Paolo Carlini <pcarlini@suse.de>
786 * include/bits/fstream.tcc (imbue): Exploit the external
787 buffer to imbue 'on the fly' a new locale and convert its
788 remainder with the new codecvt facet.
789 (underflow): Tweak slightly to deal with this special case.
790 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
791 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
792 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
793 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
794 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
796 2004-01-10 Paolo Carlini <pcarlini@suse.de>
798 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
801 2004-01-10 Paolo Carlini <pcarlini@suse.de>
804 * include/bits/locale_classes.h (class locale): Fix category
806 * testsuite/22_locale/locale/13630.cc: Add.
808 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
810 * include/bits/locale_facets.h: Make a name really dependent. This
811 will be needed when Core Issue 224 is implemented.
813 2004-01-09 Paolo Carlini <pcarlini@suse.de>
815 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
816 * testsuite/performance/allocator_thread.cc: Likewise.
818 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
820 * crossconfig.m4: Add LFS, io bits to linux cross config.
821 * acconfig.h: Remove obsolete bits, reorder.
822 * config.h.in: Regenerate.
826 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
828 * include/bits/stl_list.h:
829 * include/bits/list.tc:
831 Performance enhancements for destructor, push_front(),
832 push_back(), pop_front(), pop_back(), sort()
833 Eliminated static_casts where possible.
834 Moved code out of header files into new src/list.cc
835 implementation file for library where possible.
836 Remove inheritance from iterator class and create separate
837 classes for non-constant and constant iterators.
838 * include/bits/stl_tree.h (_Rb_tree class):
840 Only erase contents in destructor.
841 Eliminate unnecessary initialization in assignment operator.
842 Optimize for the nominal case by not checking whether
843 container is empty in clear().
844 Re-order test in _M_insert() to improve performance.
845 Move initialization of new node's left & right pointers to
846 src/tree.cc to where new node's colour is initialized
847 and to reduce the amount of inline code.
848 Use _M_leftmost() and _M_end() to improve readability where
850 Create separate classes for non-constant and constant
851 iterators to clarify code, avoid extra template parameters and
852 casting away constness.
854 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
856 * src/Makefile.am (sources): Add list.cc, tree.cc.
857 * src/stl_tree.cc: Move to...
858 * src/tree.cc: ...here.
860 * config/linker-map.gnu: Tweaks.
861 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
862 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
864 * bits/stl_vector.h: Column wrap comments.
866 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
868 (re-open) PR libstdc++/12658
869 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
870 (locale::global): Likewise.
872 2004-01-07 Paolo Carlini <pcarlini@suse.de>
874 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
875 Remove redundant #include.
876 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
877 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
878 re-enable normal testing.
879 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
881 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
882 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
884 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
886 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
888 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
890 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
892 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
894 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
896 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
897 More properly, #include <locale>.
898 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
899 Remove redundant #include.
900 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
901 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
902 redundant DejaGnu directive.
903 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
906 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
907 Stefan Olsson <stefan@snon.net>
909 * scripts/check_performance: Use -pthread.
910 * testsuite/performance/allocator.cc: Tweaks, add list.
911 * testsuite/performance/allocator_thread.cc: New.
913 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
915 * include/bits/locale_facets.h: Document public classes and
917 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
920 2004-01-06 Paolo Carlini <pcarlini@suse.de>
922 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
923 Remove redundant #includes.
924 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
926 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
928 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
929 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
930 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
931 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
932 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
933 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
934 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
935 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
936 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
937 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
938 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
939 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
940 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
941 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
942 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
944 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
946 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
948 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
950 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
952 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
953 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
954 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
956 2004-01-04 Paolo Carlini <pcarlini@suse.de>
958 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
959 Remove redundant #includes.
960 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
962 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
964 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
966 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
968 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
970 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
972 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
974 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
976 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
978 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
980 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
982 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
985 2004-01-04 Mark Mitchell <mark@codesourcery.com>
988 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
990 * testsuite/27_io/basic_fstream/4.cc: Likewise.
991 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
992 * testsuite/27_io/basic_ios/4.cc: Likewise.
993 * testsuite/27_io/basic_iostream/4.cc: Likewise.
994 * testsuite/27_io/basic_istream/4.cc: Likewise.
995 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
996 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
997 * testsuite/27_io/basic_ostream/4.cc: Likewise.
998 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
999 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
1000 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
1002 2004-01-04 Paolo Carlini <pcarlini@suse.de>
1004 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
1005 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
1006 always use double underscored names.
1007 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
1009 * include/bits/locale_facets.h (struct __numpunct_cache):
1010 Dimension _M_atoms_out and _M_atoms_in one position smaller.
1011 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out