OSDN Git Service

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