diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-10 01:36:23 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-10 01:36:23 +0000 |
commit | 6be56288fb3e6f817f93c13c818a552c55f8af0c (patch) | |
tree | 45fa7d50dd90da3ed8d23836b59c14a79fee0a1d /libstdc++-v3 | |
parent | 314b6875a194473b9e8343cde9f6e270d58774b0 (diff) | |
download | gcc-6be56288fb3e6f817f93c13c818a552c55f8af0c.tar.gz |
2001-03-09 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* include/bits/istream.tcc ( basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
Use streamsize, not int_type.
2001-03-08 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/27_io/streambuf.cc (test06): New test, disabled at the
moment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40358 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 11 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/istream.tcc | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/27_io/streambuf.cc | 11 |
3 files changed, 25 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0c73017367a..62af63c0ff5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2001-03-09 Gabriel Dos Reis <gdr@merlin.codesourcery.com> + + * include/bits/istream.tcc ( basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)): + Use streamsize, not int_type. + +2001-03-08 Benjamin Kosnik <bkoz@redhat.com> + + * testsuite/27_io/streambuf.cc (test06): New test, disabled at the + moment. + 2001-03-08 Andreas Schwab <schwab@suse.de> * acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Fix syntax in test diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index faee226ce6c..0ea81cf5f23 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -984,9 +984,9 @@ namespace std { { try { // Figure out how many characters to extract. - int_type __num = static_cast<int_type>(__in.width()); - if (__num <= 0) - __num = basic_string<_CharT, _Traits>::npos; + streamsize __num = __in.width(); + if (__num == 0) + __num = numeric_limits<streamsize>::max(); __streambuf_type* __sb = __in.rdbuf(); const __ctype_type* __ctype = __in._M_get_fctype_ios(); diff --git a/libstdc++-v3/testsuite/27_io/streambuf.cc b/libstdc++-v3/testsuite/27_io/streambuf.cc index 4aaa8958408..30a449979c8 100644 --- a/libstdc++-v3/testsuite/27_io/streambuf.cc +++ b/libstdc++-v3/testsuite/27_io/streambuf.cc @@ -326,6 +326,17 @@ void test05() nsp.sputc('a'); } +// test06 +// XXX this should work, doesn't due to compiler limitations. +#if 0 +namespace gnu +{ + class something_derived; +} + +class gnu::something_derived : std::streambuf { }; +#endif + int main() { test01(); |