1 2004-01-31 Paolo Carlini <pcarlini@suse.de>
3 * include/bits/stl_algo.h: Minor additional reformat, add
5 * include/bits/stl_algobase.h: Add copyright year.
7 2004-01-31 Paolo Carlini <pcarlini@suse.de>
9 * include/bits/stl_algo.h: Wrap overlong lines, constify
10 a few variables, reformat according to the coding standards.
11 * include/bits/stl_algobase.h: Likewise.
12 * include/bits/stl_heap.h: Likewise.
14 2004-01-31 Paolo Carlini <pcarlini@suse.de>
16 * include/bits/basic_string.h (_Rep::operator[]): Remove, unused.
18 * include/bits/basic_string.h: Fix two comments.
20 2004-01-31 Per Bothner <per@bothner.com>
22 * include/ext/mt_allocator.h
23 (__mt_alloc::_S_thread_freelist_mutex): Guard with
26 2004-01-31 Paolo Carlini <pcarlini@suse.de>
28 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
30 2004-01-30 Paolo Carlini <pcarlini@suse.de>
32 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
33 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
34 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
36 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
38 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
39 Don't use clear, but instead assign. Use insert.
41 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
43 * src/demangle.cc: Add instantiations.
44 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
45 * src/Makefile.in: Regenerate.
47 2004-01-30 David Edelsohn <edelsohn@gnu.org>
49 * src/allocator.cc: Protect _S_get_thread_id() and
50 _S_thread_key_destr() with #ifdef __GTHREADS.
52 2004-01-30 Paolo Carlini <pcarlini@suse.de>
54 Reshuffle performance testsuite.
55 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
56 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
57 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
58 fstream_seek_write.cc, ifstream_extract_float.cc,
59 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
60 list_create_fill_sort.cc, map_create_fill.cc,
61 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
62 ofstream_insert_float.cc, ofstream_insert_int.cc,
63 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
64 wchar_t_out.cc: Split into...
65 * testsuite/performance/20_util/allocator.cc: New.
66 * testsuite/performance/20_util/allocator_map_thread.cc: New.
67 * testsuite/performance/20_util/allocator_thread.cc: New.
68 * testsuite/performance/21_strings/string_append: New.
69 * testsuite/performance/22_locale/is_wchar_t.cc: New.
70 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
71 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
72 * testsuite/performance/22_locale/wchar_t_in.cc: New.
73 * testsuite/performance/22_locale/wchar_t_length.cc: New.
74 * testsuite/performance/22_locale/wchar_t_out.cc: New.
75 * testsuite/performance/23_containers/container_benchmark.cc: New.
76 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
77 * testsuite/performance/23_containers/map_create_fill.cc: New.
78 * testsuite/performance/26_numerics/complex_norm.cc: New.
79 * testsuite/performance/27_io/cout_insert_int.cc: New.
80 * testsuite/performance/27_io/filebuf_copy.cc: New.
81 * testsuite/performance/27_io/filebuf_sputc.cc: New.
82 * testsuite/performance/27_io/fstream_seek_write.cc: New.
83 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
84 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
85 * testsuite/performance/27_io/ifstream_getline.cc: New.
86 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
87 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
89 2004-01-30 Paolo Carlini <pcarlini@suse.de>
91 * include/bits/basic_string.tcc (_Rep::_S_create):
92 Never allocate a string bigger than max_size(); always keep
93 __capacity and __size in sync to avoid memory leaks at
96 2004-01-30 Paolo Carlini <pcarlini@suse.de>
98 * include/bits/basic_string.tcc (_S_construct(_InIterator,
99 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
100 the double loop, streamline.
102 * include/bits/basic_string.tcc: Very minor tweaks.
104 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
106 * scripts/check_performance: Only compile with $THREAD_FLAG
107 when test is marked to require it. Allow multiple
108 compilations/executions of marked tests.
109 * testsuite/testsuite_performance.h (report_performance):
110 Report dynamic thread support status.
111 (report_header): Likewise.
112 * testsuite/performance/allocator.cc: Stabilize iteration
113 count. Support more allocators. Mark each allocator test to
114 run and report independently.
115 * testsuite/performance/allocator_map_thread.cc: Likewise.
116 * testsuite/performance/allocator_thread.cc: Likewise.
118 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
120 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
121 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
122 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
123 std::get_temporary_buffer() instead of duplicating its code.
124 Update to C++STYLE conventions.
125 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
126 new() instead of std::malloc().
127 (return_temporary_buffer): Use ::operator delete() instead of
130 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
132 * include/bits/allocator.h: Temporary switch to new_allocator as
133 the default to unjam bootstraps.
135 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
137 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
138 * include/Makefile.in: Regenerate.
139 * include/bits/allocator_traits.h: Remove.
140 * include/bits/allocator.h: Remove allocator_traits.h include, and
142 (allocator): Empty base class, inherit from the underlying allocator.
143 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
144 * src/allocator.cc: ...here. New. For the underlying allocators.
145 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
146 * config/linker-map.gnu: Remove __pool_alloc bits.
147 * src/Makefile.am (sources): Add allocator.cc.
148 * src/Makefile.in: Regenerate.
149 * testsuite/20_util/allocator/1.cc: Split second test into...
150 * testsuite/20_util/allocator/8230.cc: ...this.
151 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
152 typedef to use std::allocatore. Format.
153 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
155 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
156 __throw_bad_alloc calls. Don't include <memory>.
157 * include/ext/malloc_allocator.h: Remove <memory> include.
158 * include/ext/new_allocator.h (new_allocator): Same.
159 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
160 declaration. Switch __alloc to _Alloc.
161 * include/ext/hashtable.h: Remove __alloc.
162 * include/backward/alloc.h: Only inject allocator, not
163 implementation details.
165 * include/ext/mt_allocator.h: Replace free with delete.
167 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
169 * src/globals_io.cc: Change to __gnu_internal namespace.
170 * src/globals_locale.cc: Same.
171 * src/locale_init.cc: Same.
172 * src/ios_init.cc: Same.
174 2004-01-28 Stefan Olsson <stefan@snon.net>
176 * include/ext/mt_allocator.h: Replaced all malloc() calls with
177 operator new(). Added support for the env variable
178 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
179 one in allocate() as well). Fix typos.
181 2004-01-28 Paolo Carlini <pcarlini@suse.de>
183 * include/bits/basic_string.h (_S_create(size_t,
184 const _Alloc&): Change signature to take two size_type
186 * include/bits/basic_string.tcc (_S_construct(_InIterator,
187 _InIterator, const _Alloc&, input_iterator_tag)): Update
189 (_S_construct(_InIterator, _InIterator, const _Alloc&,
190 forward_iterator_tag)): Likewise.
191 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
192 (_M_mutate(size_type, size_type, size_type)): Don't
193 implement the exponential growth policy, demand it to
194 _S_create, update call and simplify.
195 (_M_clone(const _Alloc&, size_type)): Likewise.
196 (_S_create(size_type, size_type, const _Alloc&)): Implement
197 the growth policy, simplify otherwise.
199 * include/bits/basic_string.h (_Rep::operator[]): Tweak
200 signature to take a size_type, consistently with the other
203 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
205 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
206 delete declarations, add include and test variable.
208 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
210 * include/bits/codecvt.h, include/bits/locale_facets.h,
211 include/bits/postypes.h, include/bits/stl_bvector.h,
212 include/bits/stl_multiset.h, include/bits/stl_set.h,
213 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
214 include/std/std_complex.h: Document.
216 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
219 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
220 iword/pword selector.
221 (ios_base::iword, ios_base::pword): Use it.
222 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
223 iword or pword member on alloc failure.
224 * testsuite/27_io/ios_base/storage/11584.cc: New test.
226 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
227 PJ Darcy <darcypj@us.ibm.com>
229 * configure.host: Add support for *-tpf.
230 * crossconfig.m4: Likewise.
231 * configure: Regenerate.
232 * config/os/tpf: New directory.
233 * config/os/tpf/os_defines.h: New file.
234 * config/os/tpf/ctype_base.h: Likewise.
235 * config/os/tpf/ctype_inline.h: Likewise.
236 * config/os/tpf/ctype_noninline.h: Likewise.
238 2004-01-27 Paolo Carlini <pcarlini@suse.de>
241 * include/bits/sstream.tcc: Guard use of extern template.
243 2004-01-27 Paolo Carlini <pcarlini@suse.de>
245 * include/bits/basic_string.tcc
246 (basic_string(const basic_string&, size_type, size_type),
247 basic_string(const basic_string&, size_type, size_type,
248 const _Alloc&)): Avoid unnecessarily constructing iterators.
250 2004-01-26 Paolo Carlini <pcarlini@suse.de>
252 * config/locale/generic/c_locale.cc: Fix throw messages
253 to use the __N marker.
254 * config/locale/gnu/c_locale.cc: Likewise.
255 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
257 * docs/html/17_intro/C++STYLE: Likewise.
258 * include/bits/basic_ios.tcc: Likewise.
259 * include/bits/fstream.tcc: Likewise.
260 * include/bits/vector.tcc: Likewise.
261 * include/ext/ropeimpl.h: Likewise.
262 * include/std/std_bitset.h: Likewise.
263 * src/ios.cc: Likewise.
264 * src/locale.cc: Likewise.
265 * src/localename.cc: Likewise.
267 2004-01-26 Paolo Carlini <pcarlini@suse.de>
269 * include/bits/basic_string.h (_M_replace_aux): Use the
270 __N marker in throw message.
271 * include/bits/basic_string.tcc (assign(const _CharT*,
272 size_type), insert(size_type, const _CharT*, size_type),
273 replace(size_type, size_type, const _CharT*, size_type),
274 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
277 * include/bits/basic_string.h, include/bits/basic_string.tcc:
278 Fold overlong lines, minor formatting changes.
280 2004-01-26 Paolo Carlini <pcarlini@suse.de>
282 * include/bits/basic_string.h (replace(iterator, iterator,
283 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
284 (replace(iterator, iterator, const _CharT*)): Ditto.
285 (replace(iterator, iterator, const _CharT*, size_type)):
286 Add missing _GLIBCXX_DEBUG_PEDASSERT.
288 2004-01-26 Paolo Carlini <pcarlini@suse.de>
290 * include/bits/basic_string.tcc (replace(size_type,
291 size_type, const _CharT*, size_type)): Implement optimized
292 in-place algorithm for non-overlapping ranges.
293 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
294 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
296 * include/bits/basic_string.tcc (insert(size_type,
297 const _CharT*, size_type)): Tweak slightly.
299 2004-01-26 Andreas Schwab <schwab@suse.de>
301 * config/locale/gnu/monetary_members.cc: Restore locale before
302 rethrowing exception.
304 2004-01-25 Paolo Carlini <pcarlini@suse.de>
306 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
308 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
311 * include/bits/basic_string.tcc: Very minor tweaks.
313 2004-01-25 Paolo Carlini <pcarlini@suse.de>
315 * testsuite/performance/string_append.cc: Increase number
318 2004-01-25 Paolo Carlini <pcarlini@suse.de>
320 * include/bits/basic_string.h (erase(size_type, size_type),
321 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
322 instead, thus avoiding redundant check for length_error.
324 * include/bits/basic_string.h: Tweak some comments.
326 2004-01-24 Paolo Carlini <pcarlini@suse.de>
328 * include/bits/basic_string.tcc (operator+(const _CharT*,
329 const basic_string&)): No need to go through the append
330 taking two iterators.
332 2004-01-24 Paolo Carlini <pcarlini@suse.de>
334 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
335 Revert last change to use std::min: machine language is worse.
336 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
337 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
338 (find_last_not_of(_CharT, size_type)): Ditto.
340 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
341 size_type)): Discard the value returned by _M_check.
342 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
343 (append(const basic_string&, size_type, size_type)): Ditto.
344 (copy(_CharT*, size_type, size_type)): Ditto.
345 (compare(size_type, size_type, const basic_string&)): Ditto.
346 (compare(size_type, size_type, const basic_string&,
347 size_type, size_type)): Ditto.
348 (compare(size_type, size_type, const _CharT*)): Ditto.
349 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
351 2004-01-24 Paolo Carlini <pcarlini@suse.de>
353 * include/bits/basic_string.h (insert(size_type,
354 const basic_string&, size_type, size_type)): Define inline here.
355 * include/bits/basic_string.tcc (insert(size_type,
356 const basic_string&, size_type, size_type)): Move inline.
358 2004-01-24 Paolo Carlini <pcarlini@suse.de>
360 * include/bits/basic_string.h (assign(const basic_string&,
361 size_type, size_type)): Define inline here.
362 (replace(size_type, size_type, const basic_string&,
363 size_type, size_type)): Ditto.
364 (_M_replace_dispatch(iterator, iterator, _InputIterator,
365 _InputIterator, __false_type)): Only declare.
366 (_M_replace(iterator, iterator, _InputIterator,
367 _InputIterator)): Remove.
368 * include/bits/basic_string.tcc (assign(const basic_string&,
369 size_type, size_type)): Move inline.
370 (replace(size_type, size_type, const basic_string&,
371 size_type, size_type)): Ditto.
372 (_M_replace_dispatch(iterator, iterator, _InputIterator,
373 _InputIterator, __false_type)): Define, now does also what
374 _M_replace did before.
375 * src/string-inst.cc (_M_replace): Don't instantiate.
377 * include/bits/basic_string.tcc (find(const _CharT*,
378 size_type, size_type)): Tidy.
379 (rfind(_CharT, size_type)): Ditto.
380 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
381 (find_first_not_of(_CharT, size_type)): Ditto.
382 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
383 (find_last_not_of(_CharT, size_type)): Ditto.
385 2004-01-23 Paolo Carlini <pcarlini@suse.de>
388 * include/debug/bitset (operator|=): Fix typo.
389 * testsuite/23_containers/bitset/operations/13838.cc: New.
391 2004-01-23 Paolo Carlini <pcarlini@suse.de>
393 * include/bits/basic_string.tcc (insert(size_type,
394 const _CharT*, size_type __n)): Fix length_error check.
395 (replace(size_type, size_type, const _CharT*, size_type):
396 Ditto; call _M_replace_safe.
397 (_M_replace_aux(size_type, size_type, size_type, _CharT):
398 Fix length_error check.
399 (_M_replace(iterator, iterator, _InputIterator,
400 _InputIterator)): Ditto, tweak.
401 (_M_replace_safe(size_type, size_type, const _CharT*,
402 size_type)): Remove length_error check.
404 * include/bits/basic_string.tcc (append(const basic_string&),
405 append(const basic_string&, size_type, size_type)): Tweak
408 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
409 size_type)): If __n == 0 don't call traits::copy.
411 2004-01-23 Stefan Olsson <stefan@snon.net>
413 * include/ext/mt_allocator.h: Reduce lock contention.
415 2004-01-23 Paolo Carlini <pcarlini@suse.de>
418 * include/bits/fstream.tcc (underflow): Remove unused
420 * include/bits/streambuf_iterator.h (equal): Ditto.
421 * include/bits/locale_facets.h (_M_convert_from_char):
424 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
427 * config/linker-map.gnu (nan): Delete.
428 * libmath/mathconf.h (NAN, nan): Delete.
429 * linkage.m4 (nan): Don't check for it.
430 * libmath/nan.c: Delete file.
432 * config.h.in, configure: Regenerate.
434 2004-01-23 Paolo Carlini <pcarlini@suse.de>
436 * include/bits/basic_string.h (push_back(_CharT)):
438 (insert(size_type, const basic_string&)): Trivial tweak.
439 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
440 (insert(iterator, _CharT)): Ditto.
441 (erase(size_type, size_type)): Ditto.
442 (erase(iterator)): Ditto.
443 (erase(iterator, iterator)): Ditto.
444 (replace(size_type, size_type, size_type, _CharT)): Ditto.
446 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
449 * testsuite/performance/allocator_map_thread.cc: New test.
451 2004-01-22 Paolo Carlini <pcarlini@suse.de>
453 * include/bits/locale_facets.tcc
454 (money_put::do_put(..., long double)): Use the basic_string
455 constructor for char arrays, not that for C-strings, to pass
456 __digits to do_put(..., const string_type&): __ws isn't
459 2004-01-22 Paolo Carlini <pcarlini@suse.de>
461 * include/bits/basic_string.h (_M_replace_safe): Change
462 signatures to take size_types and const _CharT*.
463 (_M_replace_aux): Likewise, takes size_types instead of
465 (append(size_type, _CharT)): Update call.
466 (assign(size_type, _CharT)): Ditto.
467 (replace(iterator, iterator, size_type, _CharT)): Ditto.
468 (_M_replace_dispatch(iterator, iterator, _Integer,
469 _Integer, __true_type)): Ditto.
470 * include/bits/basic_string.tcc (assign(const _CharT*,
472 (insert(size_type, const _CharT*, size_type)): Ditto.
473 (replace(size_type, size_type, const _CharT*,
475 (_M_replace(iterator, iterator, _InputIterator,
476 _InputIterator)): Ditto.
477 (append(const basic_string&)): Ditto.
478 (append(const basic_string&, size_type, size_type): Ditto.
479 (append(const _CharT*, size_type): Ditto.
480 (_M_replace_safe, _M_replace_safe): Change definitions
481 accordingly, simplify.
482 * string-inst.cc (_M_replace_safe): Don't instantiate.
484 2004-01-21 Paolo Carlini <pcarlini@suse.de>
486 * include/bits/basic_string.tcc (append(const basic_string&)):
487 Revert previous change.
488 (append(const basic_string&, size_type, size_type)): Revert
489 previous change, use _M_check and _M_limit.
491 2004-01-21 Paolo Carlini <pcarlini@suse.de>
493 * include/bits/basic_string.h (_M_check): Change to return
494 a checked __pos and take an additional const char* argument.
495 (_M_fold): Rename to _M_limit, change to return a size_type,
496 corresponding to the __off limited to the actual length.
497 (insert(size_type, size_type, _CharT)): Update call, call
499 (insert(iterator, _CharT)): Call replace(iterator, iterator,
500 size_type, _CharT) instead.
501 (erase(size_type, size_type)): Update calls.
502 (replace(size_type, size_type, size_type, _CharT)): Ditto.
503 (substr(size_type, size_type)): Use _M_check.
504 * include/bits/basic_string.tcc (basic_string(const basic_string&,
505 size_type, size_type)): Update calls.
506 (basic_string(const basic_string&, size_type, size_type,
507 const _Alloc&)): Ditto.
508 (assign(const basic_string&, size_type, size_type)): Use the
509 new _M_check and _M_limit.
510 (insert(size_type, const basic_string&, size_type, size_type):
512 (insert(size_type, const _CharT*, size_type)): Ditto.
513 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
514 (replace(size_type, size_type, const basic_string&,
515 size_type, size_type)): Ditto.
516 (append(const basic_string&)): Ditto.
517 (append(const basic_string&, size_type, size_type)): Ditto.
518 (copy(_CharT*, size_type, size_type)): Ditto.
519 (compare(size_type, size_type, const basic_string&)): Ditto.
520 (compare(size_type, size_type, const basic_string&,size_type,
522 (compare(size_type, size_type, const _CharT*)): Ditto.
523 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
525 2004-01-19 Stefan Olsson <stefan@snon.net>
527 * include/ext/mt_allocator.h: If a thread, when it dies, still has
528 memory on it's freelist this memory is not returned to global
529 list. Simplification of deallocate so that memory is always
530 returned to the calling thread id's freelist instead of to
531 global. Fix typos. Add volatile where appropriate.
533 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
535 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
536 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
537 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
539 2004-01-19 Paolo Carlini <pcarlini@suse.de>
541 * src/debug.cc: Make sure all the names are prefixed with
542 double (or single) underscore.
544 2004-01-19 Paolo Carlini <pcarlini@suse.de>
546 * src/debug.cc: Trivial formatting change.
548 2004-01-19 Paolo Carlini <pcarlini@suse.de>
550 * include/bits/basic_string.tcc (_S_construct(size_type,
551 _CharT, const _Alloc&)): Remove redundant try/catch.
552 (_M_mutate(size_type, size_type, size_type)): Ditto.
553 (_M_clone(const _Alloc&, size_type)): Ditto.
555 2004-01-18 Paolo Carlini <pcarlini@suse.de>
557 * include/bits/basic_string.h (c_str()): Simplify, due to
558 21.3.4 the internal representation is always kept null-terminated.
559 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
560 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
561 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
564 2004-01-18 Paolo Carlini <pcarlini@suse.de>
566 * include/bits/basic_string.h (append(size_type, _CharT)):
567 Moved inline, just call _M_replace_aux, no source iterators at
568 risk of being clobbered.
569 (assign(size_type, _CharT)): Call directly _M_replace_aux.
570 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
571 input_iterator_tag)): Remove fifth unused argument.
572 (_M_replace_dispatch(iterator, iterator, _InputIterator,
573 _InputIterator, __false_type)): Update call.
574 * include/bits/basic_string.tcc (replace(size_type, size_type,
575 const _CharT*, size_type)): Update call.
576 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
577 throw string literal.
578 (_M_replace_safe(iterator, iterator, _ForwardIterator,
579 _ForwardIterator)): Likewise.
580 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
581 input_iterator_tag)): Remove fifth unused argument.
582 (append(size_type __n, _CharT __c)): Move inline.
583 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
584 const C*, const C*, input_iterator_tag)): Remove fifth unused
587 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
589 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
590 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
592 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
594 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
597 2004-01-15 Stefan Olsson <stefan@snon.net>
599 * include/ext/mt_allocator.h: Reuse thread id's as soon as
600 possible by changing the behaviour of thread_freelist to do
601 push_front when threads die instead of push_back.
603 2004-01-14 Paolo Carlini <pcarlini@suse.de>
605 * include/bits/locale_facets.h (struct __numpunct_cache):
606 Add member _M_grouping_size, caching the length of _M_grouping.
607 (__numpunct_cache<>::_M_cache): Assign the latter.
608 (__verify_grouping): Move declaration...
609 * include/bits/locale_facets.tcc (__verify_grouping):
610 ... here, change signature to take a const char* and a size_t
611 for the grouping; not a template anymore.
612 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
613 Likewise change signature and tweak consistently.
614 (num_get::_M_extract_float, num_get::_M_extract_int,
615 num_put::_M_insert_int, num_put::_M_insert_float,
616 money_get::do_get(string_type&), money_get::do_put(string_type)):
618 * config/locale/generic/numeric_members.cc
619 (numpunct<>::_M_initialize_numpunct): Assign the new member.
620 * config/locale/gnu/numeric_members.cc
621 (numpunct<>::_M_initialize_numpunct): Likewise.
622 * src/locale-inst.cc (__add_grouping): Tweak signature.
623 (__verify_grouping): Don't instantiate, not a template anymore.
625 * include/bits/locale_facets.h: Rename _M_truename_len ->
626 _M_truename_size, _M_falsename_len -> _M_falsename_size.
627 * include/bits/locale_facets.tcc: Likewise.
628 * config/locale/generic/numeric_members.cc: Likewise.
629 * config/locale/gnu/numeric_members.cc: Likewise.
631 2004-01-14 Stefan Olsson <stefan@snon.net>
633 * include/ext/mt_allocator.h: Fixups.
634 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
635 * testsuite/performance/allocator_thread.cc: Same.
637 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
639 * testsuite/performance/ifstream_extract_float.cc: Add higher
641 * testsuite/performance/ofstream_insert_float.cc: Same.
643 2004-01-13 Paolo Carlini <pcarlini@suse.de>
645 * src/locale-misc-inst.cc (__convert_from_v(long),
646 __convert_from_v(unsigned long), __convert_from_v(long long),
647 __convert_from_v(unsigned long long)): Remove, unused.
649 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
651 * testsuite/performance/ifstream_extract_float.cc: New.
652 * testsuite/performance/ofstream_insert_float.cc: Float generation
655 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
656 * 20_util/auto_ptr/1.cc: ...this.
657 * 20_util/auto_ptr/2.cc: Same.
658 * 20_util/auto_ptr/3.cc: Same.
659 * 20_util/auto_ptr/3946.cc: Same.
660 * 20_util/auto_ptr/4.cc: Same.
661 * 20_util/auto_ptr/5.cc: Same.
662 * 20_util/auto_ptr/6.cc: Same.
663 * 20_util/auto_ptr/7.cc: Same.
664 * 20_util/auto_ptr/assign_neg.cc
665 * 20_util/pairs.cc: Break into...
666 * 20_util/pair/1.cc: ...this.
667 * 20_util/pair/2.cc: Same.
668 * 20_util/pair/3.cc: Same.
669 * 20_util/pair/4.cc: Same.
671 2004-01-13 Paolo Carlini <pcarlini@suse.de>
673 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
674 Set correctly just basefield, the only group that matters.
676 2004-01-13 Paolo Carlini <pcarlini@suse.de>
678 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
679 (_Rope_rep_base): Inherit directly from the rope allocator;
680 use rebinding instead of _Alloc_traits; pick up data member
681 from _Rope_rep_alloc_base.
682 (_Rope_alloc_base): Eliminate.
683 (_Rope_base): Inherit directly from the rope allocator; use
684 rebinding instead of _Alloc_traits; pick up data member from
686 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
687 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
689 2004-01-13 Paolo Carlini <pcarlini@suse.de>
692 * include/bits/basic_string.tcc (compare(size_type, size_type,
693 const _CharT*, size_type)): Implement correctly the resolution
694 of DR 5: basically, s is a char array, -not- a C string.
695 * include/bits/basic_string.h: Tweak some comments.
696 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
697 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
699 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
701 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
704 2004-01-12 Paolo Carlini <pcarlini@suse.de>
706 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
708 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
711 2004-01-12 Paolo Carlini <pcarlini@suse.de>
713 * include/bits/locale_facets.h (struct __numpunct_cache):
714 Add members _M_truename_len and _M_falsename_len, caching
715 the lengths of _M_truename and _M_falsename.
716 (__numpunct_cache<>::_M_cache): Assign the latter.
717 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
718 num_put::do_put(bool)): Use the new members, thus avoiding
719 computing string lengths again and again.
720 * config/locale/generic/numeric_members.cc
721 (numpunct<>::_M_initialize_numpunct): Assign the new members.
722 * config/locale/gnu/numeric_members.cc
723 (numpunct<>::_M_initialize_numpunct): Likewise.
725 2004-01-12 Mark Mitchell <mark@codesourcery.com>
727 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
728 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
730 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
731 and remove Cygwin XFAIL.
732 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
733 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
734 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
735 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
737 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
738 * testsuite/27_io/objects/char/7.cc: Likewise.
739 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
740 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
741 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
743 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
745 * include/std/std_complex.h (std::complex<>::real): Return a
746 reference. Add non-const overload.
747 (std::complex<>::real): Likewise.
748 (std::real): Likewise.
749 (std::imag): Likewise.
750 (std::operator+): Tidy.
751 (std::operator-): Likewise.
752 (std::operator*): Likewise.
753 (std::operator/): Likewise.
754 (std::operator>>): Likewise.
756 2004-01-11 Paolo Carlini <pcarlini@suse.de>
759 * include/bits/fstream.tcc (imbue): Exploit the external
760 buffer to imbue 'on the fly' a new locale and convert its
761 remainder with the new codecvt facet.
762 (underflow): Tweak slightly to deal with this special case.
763 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
764 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
765 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
766 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
767 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
769 2004-01-10 Paolo Carlini <pcarlini@suse.de>
771 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
774 2004-01-10 Paolo Carlini <pcarlini@suse.de>
777 * include/bits/locale_classes.h (class locale): Fix category
779 * testsuite/22_locale/locale/13630.cc: Add.
781 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
783 * include/bits/locale_facets.h: Make a name really dependent. This
784 will be needed when Core Issue 224 is implemented.
786 2004-01-09 Paolo Carlini <pcarlini@suse.de>
788 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
789 * testsuite/performance/allocator_thread.cc: Likewise.
791 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
793 * crossconfig.m4: Add LFS, io bits to linux cross config.
794 * acconfig.h: Remove obsolete bits, reorder.
795 * config.h.in: Regenerate.
799 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
801 * include/bits/stl_list.h:
802 * include/bits/list.tc:
804 Performance enhancements for destructor, push_front(),
805 push_back(), pop_front(), pop_back(), sort()
806 Eliminated static_casts where possible.
807 Moved code out of header files into new src/list.cc
808 implementation file for library where possible.
809 Remove inheritance from iterator class and create separate
810 classes for non-constant and constant iterators.
811 * include/bits/stl_tree.h (_Rb_tree class):
813 Only erase contents in destructor.
814 Eliminate unnecessary initialization in assignment operator.
815 Optimize for the nominal case by not checking whether
816 container is empty in clear().
817 Re-order test in _M_insert() to improve performance.
818 Move initialization of new node's left & right pointers to
819 src/tree.cc to where new node's colour is initialized
820 and to reduce the amount of inline code.
821 Use _M_leftmost() and _M_end() to improve readability where
823 Create separate classes for non-constant and constant
824 iterators to clarify code, avoid extra template parameters and
825 casting away constness.
827 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
829 * src/Makefile.am (sources): Add list.cc, tree.cc.
830 * src/stl_tree.cc: Move to...
831 * src/tree.cc: ...here.
833 * config/linker-map.gnu: Tweaks.
834 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
835 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
837 * bits/stl_vector.h: Column wrap comments.
839 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
841 (re-open) PR libstdc++/12658
842 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
843 (locale::global): Likewise.
845 2004-01-07 Paolo Carlini <pcarlini@suse.de>
847 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
848 Remove redundant #include.
849 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
850 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
851 re-enable normal testing.
852 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
854 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
855 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
857 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
859 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
861 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
863 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
865 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
867 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
869 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
870 More properly, #include <locale>.
871 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
872 Remove redundant #include.
873 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
874 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
875 redundant DejaGnu directive.
876 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
879 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
880 Stefan Olsson <stefan@snon.net>
882 * scripts/check_performance: Use -pthread.
883 * testsuite/performance/allocator.cc: Tweaks, add list.
884 * testsuite/performance/allocator_thread.cc: New.
886 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
888 * include/bits/locale_facets.h: Document public classes and
890 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
893 2004-01-06 Paolo Carlini <pcarlini@suse.de>
895 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
896 Remove redundant #includes.
897 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
899 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
901 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
902 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
903 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
904 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
905 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
906 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
907 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
908 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
909 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
910 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
911 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
912 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
913 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
914 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
915 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
917 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
919 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
921 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
923 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
925 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
926 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
927 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
929 2004-01-04 Paolo Carlini <pcarlini@suse.de>
931 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
932 Remove redundant #includes.
933 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
935 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
937 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
939 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
941 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
943 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
945 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
947 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
949 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
951 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
953 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
955 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
958 2004-01-04 Mark Mitchell <mark@codesourcery.com>
961 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
963 * testsuite/27_io/basic_fstream/4.cc: Likewise.
964 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
965 * testsuite/27_io/basic_ios/4.cc: Likewise.
966 * testsuite/27_io/basic_iostream/4.cc: Likewise.
967 * testsuite/27_io/basic_istream/4.cc: Likewise.
968 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
969 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
970 * testsuite/27_io/basic_ostream/4.cc: Likewise.
971 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
972 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
973 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
975 2004-01-04 Paolo Carlini <pcarlini@suse.de>
977 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
978 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
979 always use double underscored names.
980 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
982 * include/bits/locale_facets.h (struct __numpunct_cache):
983 Dimension _M_atoms_out and _M_atoms_in one position smaller.
984 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out