OSDN Git Service

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