From 9c9e97bdb43ba6f8adf64def01d84eed3e0ceee1 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 30 Sep 2004 17:23:10 +0000 Subject: [PATCH] PR libstdc++/10975 (DR 453) 2004-09-30 Paolo Carlini PR libstdc++/10975 (DR 453) * include/bits/sstream.tcc (seekoff): Don't fail if __beg == 0 and __off == 0. * docs/html/ext/howto.html: Add an entry for DR 453. * testsuite/27_io/basic_stringbuf/seekoff/char/10975.cc: New. * testsuite/27_io/basic_stringbuf/seekoff/wchar_t/10975.cc: Likewise. * testsuite/27_io/basic_istream/tellg/char/1.cc: Tweak consistently. * testsuite/27_io/basic_ostream/tellp/char/1.cc: Likewise. * testsuite/27_io/basic_ostream/tellp/char/2.cc: Likewise. * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc: Fix and move to... * testsuite/27_io/basic_istream/seekp/char/2346-fstream.cc: ... here. * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc: Fix and move to... * testsuite/27_io/basic_istream/seekp/char/2346-sstream.cc: ... here. From-SVN: r88341 --- libstdc++-v3/ChangeLog | 18 ++++++ libstdc++-v3/docs/html/ext/howto.html | 6 ++ libstdc++-v3/include/bits/sstream.tcc | 4 +- .../27_io/basic_istream/tellg/char/1.cc | 7 ++- .../seekp}/char/2346-fstream.cc | 16 +++--- .../seekp}/char/2346-sstream.cc | 17 +++--- .../27_io/basic_ostream/tellp/char/1.cc | 10 ++-- .../27_io/basic_ostream/tellp/char/2.cc | 8 +-- .../basic_stringbuf/seekoff/char/10975.cc | 57 +++++++++++++++++++ .../basic_stringbuf/seekoff/wchar_t/10975.cc | 57 +++++++++++++++++++ 10 files changed, 173 insertions(+), 27 deletions(-) rename libstdc++-v3/testsuite/27_io/{basic_istream/seekg => basic_ostream/seekp}/char/2346-fstream.cc (81%) rename libstdc++-v3/testsuite/27_io/{basic_istream/seekg => basic_ostream/seekp}/char/2346-sstream.cc (79%) create mode 100644 libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/10975.cc create mode 100644 libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/10975.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d7feffc7b3d..2e928168b28 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,21 @@ +2004-09-30 Paolo Carlini + + PR libstdc++/10975 (DR 453) + * include/bits/sstream.tcc (seekoff): Don't fail if __beg == 0 + and __off == 0. + * docs/html/ext/howto.html: Add an entry for DR 453. + * testsuite/27_io/basic_stringbuf/seekoff/char/10975.cc: New. + * testsuite/27_io/basic_stringbuf/seekoff/wchar_t/10975.cc: Likewise. + * testsuite/27_io/basic_istream/tellg/char/1.cc: Tweak consistently. + * testsuite/27_io/basic_ostream/tellp/char/1.cc: Likewise. + * testsuite/27_io/basic_ostream/tellp/char/2.cc: Likewise. + * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc: Fix and + move to... + * testsuite/27_io/basic_istream/seekp/char/2346-fstream.cc: ... here. + * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc: Fix and + move to... + * testsuite/27_io/basic_istream/seekp/char/2346-sstream.cc: ... here. + 2004-09-29 Paolo Carlini * include/std/std_sstream.h (basic_stringbuf(ios_base::openmode)): diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html index 5670c469768..5b4a69fb1f7 100644 --- a/libstdc++-v3/docs/html/ext/howto.html +++ b/libstdc++-v3/docs/html/ext/howto.html @@ -496,6 +496,12 @@
Replace "new" with "::new".
+ +
453: + basic_stringbuf::seekoff need not always fail for an empty stream +
+
Don't fail if the next pointer is null and newoff is zero. +