OSDN Git Service

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