Paolo Carlini
98ce9d068e
std_fstream.h (_M_set_buffer): Fix indentation.
...
2003-05-21 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_fstream.h (_M_set_buffer): Fix indentation.
From-SVN: r67065
2003-05-21 20:22:25 +00:00
GCC Administrator
36f72608a3
Daily bump.
...
From-SVN: r67047
2003-05-21 00:16:37 +00:00
Gerald Pfeifer
e5a3a5b240
stl_alloc.h (__default_alloc_template::_S_chunk_alloc): Cast via void* to avoid -Wcast-align warnings.
...
* include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
Cast via void* to avoid -Wcast-align warnings.
(__default_alloc_template::_S_refill): Likewise.
From-SVN: r67041
2003-05-20 22:29:54 +00:00
Gabriel Dos Reis
1db0418ae5
re PR libstdc++/10689 (pow(std::complex(0),1/3) returns (nan, nan) instead of 0.)
...
PR libstdc++/10689
* include/std/std_complex.h (pow): Tidy
From-SVN: r66989
2003-05-20 06:52:11 +00:00
GCC Administrator
cee8d9ff4d
Daily bump.
...
From-SVN: r66979
2003-05-20 00:16:08 +00:00
GCC Administrator
48ef54fb15
Daily bump.
...
From-SVN: r66943
2003-05-19 00:16:07 +00:00
GCC Administrator
8849fb4939
Daily bump.
...
From-SVN: r66922
2003-05-18 00:16:07 +00:00
GCC Administrator
40fd18b5d6
Daily bump.
...
From-SVN: r66898
2003-05-17 00:16:07 +00:00
GCC Administrator
de80c1e359
Daily bump.
...
From-SVN: r66850
2003-05-16 00:16:07 +00:00
Paolo Carlini
e3033a2240
fstream.tcc (_M_overflow): Rewrote to call _M_convert_to_external only once (_M_buf_size is now the size...
...
2003-05-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (_M_overflow): Rewrote to call
_M_convert_to_external only once (_M_buf_size is now the size of
the put area + 1 for the overflow char of a full area); call
_M_set_buffer instead of _M_set_indeterminate.
(setbuf): Don't accept a buffer smaller than 2 chars.
(_M_underflow): Refill _M_buf_size - 1 chars; call _M_set_buffer,
instead of _M_set_determinate.
(open): Call _M_set_buffer, instead of _M_set_indeterminate.
(seekoff): Likewise.
* include/ext/stdio_filebuf.h (stdio_filebuf(int,
std::ios_base::openmode, bool, size_t),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t):
Likewise.
* include/std/std_fstream.h (_M_set_indeterminate): Remove.
(_M_set_determinate): Rename as _M_set_buffer, _M_buf_size ->
_M_buf_size - 1.
* include/std/std_streambuf.h: Tweak _M_out_lim comment.
* testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Tweak, taking
into account that, for _M_buf_size == BUFSIZ == 8192, the size of
the put area is now BUFSIZ - 1.
* testsuite/ext/stdio_filebuf_2.cc: Tweak, taking into account
that now the smallest _M_buf_size is 2 (still fails, for the same
reason, with 3.2.3)
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r66848
2003-05-15 23:43:15 +00:00
GCC Administrator
3b3acc8107
Daily bump.
...
From-SVN: r66815
2003-05-15 00:16:06 +00:00
GCC Administrator
6092cf6a29
Daily bump.
...
[[Split portion of a mixed commit.]]
From-SVN: r66794.2
2003-05-14 00:16:09 +00:00
Benjamin Kosnik
0cd1de6fc9
std_fstream.h (basic_filebuf::_M_codecvt): Add cached member.
...
2003-05-12 Benjamin Kosnik <bkoz@redhat.com>
* include/std/std_fstream.h (basic_filebuf::_M_codecvt): Add
cached member.
* include/bits/fstream.tcc (basic_filebuf::basic_filebuf):
Initialize _M_codecvt.
(basic_filebuf::imbue): Same.
(basic_filebuf::showmanyc): Use it.
(basic_filebuf::underflow): Use it.
(basic_filebuf::_M_convert_to_external): Use it.
(basic_filebuf::seekoff): Use it.
(basic_filebuf::imbue): Use it, tweaks.
* include/bits/localefwd.h (__check_facet): New.
* include/bits/locale_classes.h: Tweaks.
* include/bits/locale_facets.tcc: Tweaks.
* include/bits/basic_ios.h (basic_ios::_M_check_facet): Remove.
_M_fctype to _M_ctype, _M_fnumput to _M_num_put, _M_fnumget to
_M_num_get. Change _M_check_facet to __check_facet. Tweaks.
* include/bits/basic_ios.tcc: Same.
* include/bits/istream.tcc: Same.
* include/bits/ostream.tcc: Same.
* include/std/std_streambuf.h: Same.
* testsuite/27_io/basic_filebuf/imbue/char/2.cc: New.
* testsuite/27_io/basic_filebuf/imbue/char/3.cc: New.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/1.cc: New.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: New.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: New.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc: New.
From-SVN: r66781
2003-05-13 20:13:15 +00:00
GCC Administrator
250ab7c308
Daily bump.
...
From-SVN: r66744
2003-05-13 00:16:08 +00:00
Benjamin Kosnik
6e81c6f49c
From-SVN: r66726
2003-05-12 18:12:27 +00:00
GCC Administrator
faa302172b
Daily bump.
...
From-SVN: r66704
2003-05-12 00:16:07 +00:00
Gabriel Dos Reis
cdc958d823
re PR libstdc++/3181 (Unable to use sqrt,cos,sin,... with int argument.)
...
PR libstdc++/3181
* include/c_std/std_cmath.h: #include <bits/cpp_type_traits.h>
(acos): Handle integer argument.
(asin): Likewise.
(atan): Likewise.
(atan2): Likewise.
(ceil): Likewise.
(cos): Likewise.
(cosh): Likewise.
(exp): Likewise.
(fabs): Likewise.
(floor): Likewise.
(frexp): Likewise.
(ldexp): Likewise.
(log): Likewise.
(log10): Likewise.
(sin): Likewise.
(sinh): Likewise.
(sqrt): Likewise.
(tan): Likewise.
(tanh): Likewise.
* include/bits/cpp_type_traits.h (__are_same<>): New traits.
(__enable_if): Likewise.
* testsuite/26_numerics/cmath/overloads.C: New test.
From-SVN: r66681
2003-05-11 09:07:17 +00:00
Benjamin Kosnik
51ff814940
[multiple changes]
...
2003-05-10 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/9027
PR libstdc++/9520
PR libstdc++/10096
* include/bits/fstream.tcc (basic_file::_M_underflow): Add generic
implementation, based on old wchar_t specialization, add support
for codecvt::in() return value of codecvt_base::noconv, remove
_M_file.sys_ungetc() call.
* include/std/std_fstream.h (basic_file::underflow,
basic_file::uflow, basic_file::_M_underflow): Remove
specialization declarations, call _M_underflow from generic versions
of underflow and uflow.
* src/fstream.cc (basic_file::underflow, basic_file::uflow,
basic_file::_M_underflow): Remove specializations.
* src/Makefile.am (sources): Remove fstream.cc.
* src/Makefile.in: Regenerated.
* testsuite/27_io/basic_filebuf/underflow/10096.cc: New test.
* testsuite/27_io/basic_filebuf/underflow/char/1.cc: New test.
* testsuite/27_io/basic_filebuf/underflow/char/9027.cc: New test.
* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc: New test.
2003-05-10 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/stdio_filebuf.h (__stdio_filebuf): Remove stack
buffer.
* config/io/basic_file_stdio.h (__basic_file::xsgetn): Remove
unbuffered bits.
(__basic_file::xsputn): Same.
(__basic_file::seekoff): Same.
(__basic_file::seekpos): Same.
(__basic_file::showmanyc): Same.
* config/io/basic_file_stdio.cc: Same.
* include/std/std_fstream.h: Same.
* include/bits/fstream.tcc: Same.
* src/fstream.cc: Same.
* testsuite/27_io/basic_filebuf/sgetn/char/1.cc (test05): Tidy.
2003-05-10 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/9520
PR libstdc++/9661
PR libstdc++/9662
* include/ext/stdio_sync_filebuf.h: New file.
(basic_stdiobuf): New.
* include/Makefile.am (ext_headers): Add ext/stdio_sync_filebuf.h
* include/Makefile.in: Regenerate.
* include/bits/ios_base.h (Init::_S_create_buffers,
Init::_S_destroy_buffers): Remove declarations.
* src/globals.cc (buf_cout_sync, buf_cin_sync, buf_cerr_sync,
buf_wcout_sync, buf_wcin_sync, buf_wcerr_sync): Define.
* src/ios.cc (Init::_S_create_buffers,
Init::_S_destroy_buffers): Remove.
(Init::Init): Create and use syncronized buffers.
(ios_base::sync_with_stdio): Destroy syncronized buffers,
create and install unsyncronized buffers.
* testsuite/27_io/objects/char/10.cc: New test.
* testsuite/27_io/objects/char/9.cc: New test.
* testsuite/27_io/objects/char/9661-1.cc: New test.
* testsuite/27_io/objects/char/9661-2_xin.cc: New test.
* testsuite/27_io/objects/char/9661-2_xin.in: New.
* testsuite/27_io/objects/wchar_t/1.cc: New test.
* testsuite/27_io/objects/wchar_t/10.cc: New test.
* testsuite/27_io/objects/wchar_t/2.cc: New test.
* testsuite/27_io/objects/wchar_t/2523-1_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/2523-1_xin.in: New.
* testsuite/27_io/objects/wchar_t/2523-2_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/2523-2_xin.in: New.
* testsuite/27_io/objects/wchar_t/3045.cc: New test.
* testsuite/27_io/objects/wchar_t/3647.cc: New test.
* testsuite/27_io/objects/wchar_t/3_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/3_xin.in: New.
* testsuite/27_io/objects/wchar_t/4_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/4_xin.in: New.
* testsuite/27_io/objects/wchar_t/5.cc: New test.
* testsuite/27_io/objects/wchar_t/5268.cc: New test.
* testsuite/27_io/objects/wchar_t/5280_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/5280_xin.in: New.
* testsuite/27_io/objects/wchar_t/6.cc: New test.
* testsuite/27_io/objects/wchar_t/6548_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/6548_xin.in: New.
* testsuite/27_io/objects/wchar_t/6648-1_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/6648-1_xin.in: New.
* testsuite/27_io/objects/wchar_t/6648-2_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/6648-2_xin.in: New.
* testsuite/27_io/objects/wchar_t/7.cc: New test.
* testsuite/27_io/objects/wchar_t/7744_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/7744_xin.in: New.
* testsuite/27_io/objects/wchar_t/8.cc: New test.
* testsuite/27_io/objects/wchar_t/9_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/9_xin.in: New.
* testsuite/27_io/objects/wchar_t/9520.cc: New test.
* testsuite/27_io/objects/wchar_t/9661-1.cc: New test.
* testsuite/27_io/objects/wchar_t/9661-2_xin.cc: New test.
* testsuite/27_io/objects/wchar_t/9661-2_xin.in: New.
* testsuite/27_io/objects/wchar_t/9662.cc: New test.
* testsuite/ext/stdiobuf_char.cc: New test.
* testsuite/ext/stdiobuf_wchar_t.cc: New test.
From-SVN: r66678
2003-05-11 04:20:57 +00:00
GCC Administrator
95e32f8573
Daily bump.
...
From-SVN: r66674
2003-05-11 00:16:07 +00:00
GCC Administrator
05c6099ab9
Daily bump.
...
From-SVN: r66651
2003-05-10 00:16:13 +00:00
GCC Administrator
8ac3815a08
Daily bump.
...
From-SVN: r66621
2003-05-09 00:16:06 +00:00
Paolo Carlini
db7948c2d8
std_streambuf.h (setg, setp): Don't touch _M_mode.
...
2003-05-08 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_streambuf.h (setg, setp): Don't touch _M_mode.
From-SVN: r66595
2003-05-08 11:47:45 +00:00
GCC Administrator
c156358adf
Daily bump.
...
From-SVN: r66586
2003-05-08 00:16:08 +00:00
Paolo Carlini
cd96b185c5
std_fstream.h (_M_is_indeterminate): Remove.
...
2003-05-07 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_fstream.h (_M_is_indeterminate): Remove.
* src/fstream.cc
(basic_filebuf<char/wchar_t>::_M_underflow): Simplify: either
there is no buffer or __testget == !__testinit.
* src/fstream.cc
(basic_filebuf<char/wchar_t>::_M_underflow): _M_set_determinate()
automatically sets, if appropriate, _M_out_cur == _M_in_cur.
* include/std/std_fstream.h (_M_destroy_pback): Don't set
unnecessarily _M_pback_cur_save and _M_pback_end_save.
* include/std/std_fstream.h (_M_set_determinate): Minor tweak.
* include/std/std_sstream.h (_M_sync): Minor tweak.
* include/bits/fstream.tcc (close): No need to call
_M_destroy_pback, setting _M_pback_init to false suffices
to clean up.
From-SVN: r66557
2003-05-07 12:48:58 +00:00
Benjamin Kosnik
655d78212b
stl_algo.h: Enums as _S_.
...
2003-05-06 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_algo.h: Enums as _S_.
* include/bits/stl_tree.h: Same.
* include/bits/stl_bvector.h: Same.
* include/bits/ios_base.h: Same.
* include/bits/stl_alloc.h: Same.
* include/ext/stl_hashtable.h: Same.
* src/ios.cc: And here.
* include/std/std_sstream.h: Replace _M_really_sync to _M_sync.
* include/bits/sstream.tcc: Same.
* include/bits/basic_ios.h: Correct spacing for '< ctype'.
* include/bits/locale_facets.tcc: Replace __temp to __tmp.
* include/bits/locale_facets.h (__num_base): Remove protected.
Use _S_[io]* names for enumerations.
(_S_format_int): Remove.
* include/bits/locale_facets.tcc: Same.
* src/locale.cc: Same.
* include/std/std_sstream.h (stringbuf::str): Tweak formatting.
From-SVN: r66552
2003-05-07 05:01:59 +00:00
GCC Administrator
0b745a5bcc
Daily bump.
...
From-SVN: r66544
2003-05-07 00:16:07 +00:00
Michael Ritzert
b7c4cd53ab
And retweak.
...
Co-Authored-By: Matt Kraai <kraai@alumni.cmu.edu>
From-SVN: r66530
2003-05-06 19:31:39 +00:00
Michael Ritzert
3612c9efbb
* include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): Tweak.
...
From-SVN: r66523
2003-05-06 14:32:52 +00:00
GCC Administrator
d7b4a59027
Daily bump.
...
From-SVN: r66512
2003-05-06 00:16:08 +00:00
Loren J. Rittle
1976f0d995
stl_threads.h (_Atomic_swap): Kill it...
...
* include/bits/stl_threads.h (_Atomic_swap): Kill it...
(_Swap_lock_struct<>): ...and the horse it rode in on.
* src/globals.cc (_Swap_lock_struct<>): Likewise.
* include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): New
member to support...
* include/ext/ropeimpl.h (rope<>::c_str): Follow *all* memory
visibility rules related to POSIX threads.
* testsuite/thread/pthread7-rope.cc: New test.
From-SVN: r66507
2003-05-05 22:28:16 +00:00
GCC Administrator
18ec39dad3
Daily bump.
...
From-SVN: r66473
2003-05-05 00:16:06 +00:00
GCC Administrator
c3a5317cd3
Daily bump.
...
From-SVN: r66444
2003-05-04 00:16:15 +00:00
GCC Administrator
43e9b64bf5
Daily bump.
...
From-SVN: r66407
2003-05-03 00:16:15 +00:00
Benjamin Kosnik
53c2acdf21
Makefile.am (CLEANFILES): Remove PCH files in target directory.
...
2003-05-02 Benjamin Kosnik <bkoz@redhat.com>
* include/Makefile.am (CLEANFILES): Remove PCH files in target
directory.
* include/Makefile.in: Regenerate.
From-SVN: r66403
2003-05-02 23:18:09 +00:00
Paolo Carlini
4571fbb1ec
std_sstream.h (str()): Tidy.
...
2003-05-02 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (str()): Tidy.
From-SVN: r66402
2003-05-02 23:02:03 +00:00
Nathan Myers
0992fb51ae
streambuf.tcc (__copy_streambufs): Rewrote.
...
2003-05-02 Nathan Myers <ncm@cantrip.org>
Paolo Carlini <pcarlini@unitus.it>
* include/bits/streambuf.tcc (__copy_streambufs): Rewrote.
Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
From-SVN: r66395
2003-05-02 18:35:24 +00:00
Jonathan Wakely
8515a6007c
basic_string.h (swap): Remove redundant template parameters from declaration of non-template member...
...
2003-05-02 Jonathan Wakely <redi@gcc.gnu.org>
* include/bits/basic_string.h (swap): Remove redundant template
parameters from declaration of non-template member function.
From-SVN: r66389
2003-05-02 16:50:53 +01:00
GCC Administrator
c4dec8d5a8
Daily bump.
...
From-SVN: r66365
2003-05-02 00:17:06 +00:00
Paolo Carlini
74843551df
sstream.tcc (overflow): Instead of calling str()...
...
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/bits/sstream.tcc (overflow): Instead of calling
str(), then _M_string.reserve, thus copying the contents
of the current buffer two times, just copy the latter in
a temporary, then use the 'swap trick'.
From-SVN: r66358
2003-05-02 00:14:49 +00:00
Paolo Carlini
e70b1b7788
std_sstream.h (str()): Revert the best of the previous 'improvement'...
...
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (str()): Revert the best of the
previous 'improvement', incorrect due to the COW nature of
v3 basic_string; simplify.
From-SVN: r66357
2003-05-01 23:20:33 +00:00
Paolo Carlini
f4731b64d2
streambuf.tcc (__copy_streambufs): Adjust the type of __avail to ptrdiff_t to avoid signed-unsigned warning.
...
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/bits/streambuf.tcc (__copy_streambufs): Adjust the
type of __avail to ptrdiff_t to avoid signed-unsigned warning.
From-SVN: r66356
2003-05-01 22:53:13 +00:00
Paolo Carlini
397751aef0
streambuf.tcc (basic_streambuf::xsgetn): Const-ify some variables.
...
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/bits/streambuf.tcc (basic_streambuf::xsgetn):
Const-ify some variables.
(basic_streambuf::xsputn): Likewise; change the type of some
variables to size_t.
(__copy_streambufs): Change some variables to size_t.
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (str()): Avoid constructing
a basic_string temporary not only when it would turn out
to be zero-sized but also when identical to the current
_M_string buffer.
From-SVN: r66334
2003-05-01 16:45:50 +00:00
Paolo Carlini
8544261c53
stdio_filebuf.h (stdio_filebuf(int, std::ios_base::openmode, bool, size_t), [...]): Shorten a bit (-10 lines) by factoring out some code.
...
2003-05-01 Paolo Carlini <pcarlini@unitus.it>
* include/ext/stdio_filebuf.h
(stdio_filebuf(int, std::ios_base::openmode, bool, size_t),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t)):
Shorten a bit (-10 lines) by factoring out some code.
From-SVN: r66320
2003-05-01 08:41:59 +00:00
GCC Administrator
ee704412ab
Daily bump.
...
From-SVN: r66314
2003-05-01 00:17:10 +00:00
GCC Administrator
95b588cf15
Daily bump.
...
From-SVN: r66279
2003-04-30 00:17:06 +00:00
Paolo Carlini
cc9d1c78ef
fstream.tcc (open): Change to single return.
...
2003-04-29 Paolo Carlini <pcarlini@unitus.it>
* include/bits/fstream.tcc (open): Change to single return.
From-SVN: r66245
2003-04-29 19:46:07 +00:00
Paolo Carlini
d4be2966f3
std_sstream.h (underflow): Change to single return.
...
2003-04-29 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (underflow): Change to single return.
From-SVN: r66234
2003-04-29 17:47:38 +00:00
GCC Administrator
3e1be8c1b1
Daily bump.
...
From-SVN: r66200
2003-04-29 00:17:06 +00:00
Paolo Carlini
479a181108
std_streambuf.h (_M_buf): is currently used only for basic_filebuf, therefore move it there.
...
2003-04-28 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_streambuf.h (_M_buf): is currently
used only for basic_filebuf, therefore move it there.
(basic_streambuf(), ~basic_streambuf()): Adjust.
* include/std/std_fstream.h (_M_buf): Moved here.
* include/std/std_sstream.h (setbuf): Don't set _M_buf,
is actually redundant for basic_stringbuf.
(_M_really_sync): Likewise.
* include/bits/fstream.tcc (basic_filebuf()): Adjust.
* include/bits/sstream.tcc (seekoff): Adjust.
From-SVN: r66193
2003-04-28 23:51:37 +00:00
Benjamin Kosnik
988ad90d00
localename.cc: Standardize exception strings.
...
2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
* src/localename.cc: Standardize exception strings.
* src/locale.cc: Same.
* src/ios.cc: Same.
* include/bits/basic_string.tcc: Same.
* include/bits/basic_ios.tcc: Same.
* include/std/std_bitset.h: Same.
* include/ext/ropeimpl.h: Same.
* include/bits/stl_vector.h: Same.
* include/bits/stl_deque.h: Same.
* include/bits/stl_bvector.h: Same.
* config/locale/generic/c_locale.cc: Same.
* config/locale/gnu/c_locale.cc: Same.
* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.
* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Modify.
From-SVN: r66192
2003-04-28 23:05:57 +00:00