]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert recent commit for libstdc++/26211, now suspended waiting for DR 342 (reopened...
authorPaolo Carlini <pcarlini@suse.de>
Mon, 20 Feb 2006 14:20:51 +0000 (14:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 20 Feb 2006 14:20:51 +0000 (14:20 +0000)
2006-02-20  Paolo Carlini  <pcarlini@suse.de>

Revert recent commit for libstdc++/26211, now suspended waiting for
DR 342 (reopened) to reach a new resolution.
* include/bits/istream.tcc (basic_istream<>::tellg, seekg(pos_type),
seekg(off_type, ios_base::seekdir)): Remove sentry.
* testsuite/27_io/basic_istream/seekg/char/26211.cc: Remove.
* testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/char/26211.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc: Likewise.
* testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Revert changes.
* testsuite/27_io/basic_istream/seekg/wchar_t/8348-1.cc: Likewise.
* testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
* testsuite/27_io/basic_istream/seekg/wchar_t/8348-1.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/wchar_t/8348.cc: Likewise.

From-SVN: r111302

12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/26211.cc [deleted file]
libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc [deleted file]
libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/8348-1.cc
libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/8348-2.cc
libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/26211.cc [deleted file]
libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc
libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc [deleted file]
libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/8348.cc

index 1e1c79fb275bc924e33dfba42ece69233763cdea..522293e31b1d7fd277b8add1ed523f66843d2316 100644 (file)
@@ -1,3 +1,20 @@
+2006-02-20  Paolo Carlini  <pcarlini@suse.de>
+
+       Revert recent commit for libstdc++/26211, now suspended waiting for
+       DR 342 (reopened) to reach a new resolution.
+       * include/bits/istream.tcc (basic_istream<>::tellg, seekg(pos_type),
+       seekg(off_type, ios_base::seekdir)): Remove sentry.
+       * testsuite/27_io/basic_istream/seekg/char/26211.cc: Remove.
+       * testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc: Likewise.
+       * testsuite/27_io/basic_istream/tellg/char/26211.cc: Likewise.
+       * testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc: Likewise.
+       * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Revert changes.
+       * testsuite/27_io/basic_istream/seekg/wchar_t/8348-1.cc: Likewise.
+       * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
+       * testsuite/27_io/basic_istream/seekg/wchar_t/8348-1.cc: Likewise.
+       * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
+       * testsuite/27_io/basic_istream/tellg/wchar_t/8348.cc: Likewise.
+
 2006-02-19  Paolo Carlini  <pcarlini@suse.de>
 
        * include/std/std_sstream.h (basic_stringbuf<>::setbuf): Simply
index db3e96e00e11043c9f9ca60c4a51961df9615a7c..dca39ec1424c6c8d57ebdec1e560a82e47821b83 100644 (file)
@@ -711,18 +711,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       // _GLIBCXX_RESOLVE_LIB_DEFECTS
       // DR60.  Do not change _M_gcount.
       pos_type __ret = pos_type(-1);
-      sentry __cerb(*this, true);
-      if (__cerb)
+      try
        {
-         try
-           {
-             if (!this->fail())
-               __ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
-                                                 ios_base::in);
-           }
-         catch(...)
-           { this->_M_setstate(ios_base::badbit); }
+         if (!this->fail())
+           __ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
+                                             ios_base::in);
        }
+      catch(...)
+       { this->_M_setstate(ios_base::badbit); }
       return __ret;
     }
 
@@ -733,28 +729,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     {
       // _GLIBCXX_RESOLVE_LIB_DEFECTS
       // DR60.  Do not change _M_gcount.
-      sentry __cerb(*this, true);
-      if (__cerb)
+      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+      try
        {
-         ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
-         try
+         if (!this->fail())
            {
-             if (!this->fail())
-               {
-                 // 136.  seekp, seekg setting wrong streams?
-                 const pos_type __p = this->rdbuf()->pubseekpos(__pos,
-                                                                ios_base::in);
-
-                 // 129. Need error indication from seekp() and seekg()
-                 if (__p == pos_type(off_type(-1)))
-                   __err |= ios_base::failbit;
-               }
+             // 136.  seekp, seekg setting wrong streams?
+             const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+                                                            ios_base::in);
+             
+             // 129.  Need error indication from seekp() and seekg()
+             if (__p == pos_type(off_type(-1)))
+               __err |= ios_base::failbit;
            }
-         catch(...)
-           { this->_M_setstate(ios_base::badbit); }
-         if (__err)
-           this->setstate(__err);
        }
+      catch(...)
+       { this->_M_setstate(ios_base::badbit); }
+      if (__err)
+       this->setstate(__err);
       return *this;
     }
 
@@ -765,28 +757,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     {
       // _GLIBCXX_RESOLVE_LIB_DEFECTS
       // DR60.  Do not change _M_gcount.
-      sentry __cerb(*this, true);
-      if (__cerb)
+      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+      try
        {
-         ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
-         try
+         if (!this->fail())
            {
-             if (!this->fail())
-               {
-                 // 136.  seekp, seekg setting wrong streams?
-                 const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
-                                                                ios_base::in);
-
-                 // 129. Need error indication from seekp() and seekg()
-                 if (__p == pos_type(off_type(-1)))
-                   __err |= ios_base::failbit;
-               }
+             // 136.  seekp, seekg setting wrong streams?
+             const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+                                                            ios_base::in);
+             
+             // 129.  Need error indication from seekp() and seekg()
+             if (__p == pos_type(off_type(-1)))
+               __err |= ios_base::failbit;
            }
-         catch(...)
-           { this->_M_setstate(ios_base::badbit); }
-         if (__err)
-           this->setstate(__err);
        }
+      catch(...)
+       { this->_M_setstate(ios_base::badbit); }
+      if (__err)
+       this->setstate(__err);
       return *this;
     }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/26211.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/26211.cc
deleted file mode 100644 (file)
index 4c333d3..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-#include <istream>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-// libstdc++/26211
-void test01()
-{
-  using namespace std;
-  bool test __attribute__((unused)) = true;
-  
-  typedef istringstream::pos_type pos_type;
-
-  istringstream iss("Duos for Doris");
-  ostringstream oss;
-  
-  const pos_type p0 = iss.tellg();
-  VERIFY( p0 == pos_type(0) );
-  
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-
-  iss.seekg(0, ios_base::beg);
-  VERIFY( iss.fail() );
-
-  iss.clear();
-  iss.seekg(0, ios_base::beg);
-  VERIFY( !iss.fail() );
-  VERIFY( iss.tellg() == p0 );
-
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-
-  iss.seekg(p0);
-  VERIFY( iss.fail() );
-
-  iss.clear();
-  iss.seekg(p0);
-  VERIFY( !iss.fail() );
-  VERIFY( iss.tellg() == p0 );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
index 8e2515767713c59366f9cdd6f91ed28e5a7a7eb5..04a604a4962644d296ddd3e7c63fbdfcfaa4e220 100644 (file)
@@ -41,7 +41,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(pos1);
     VERIFY( test = !iss.fail() );
   }
index 25f528919958fc441dd3068fe5a6be3bd78f99a1..f0ba6f7effbede26146c0b4ca9e5872b7dea151a 100644 (file)
@@ -41,7 +41,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(0, ios_base::beg);
     VERIFY( test = !iss.fail() );
   }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc
deleted file mode 100644 (file)
index 3397238..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-#include <istream>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-// libstdc++/26211
-void test01()
-{
-  using namespace std;
-  bool test __attribute__((unused)) = true;
-  
-  typedef wistringstream::pos_type pos_type;
-
-  wistringstream iss(L"Duos for Doris");
-  wostringstream oss;
-  
-  const pos_type p0 = iss.tellg();
-  VERIFY( p0 == pos_type(0) );
-  
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-
-  iss.seekg(0, ios_base::beg);
-  VERIFY( iss.fail() );
-
-  iss.clear();
-  iss.seekg(0, ios_base::beg);
-  VERIFY( !iss.fail() );
-  VERIFY( iss.tellg() == p0 );
-
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-
-  iss.seekg(p0);
-  VERIFY( iss.fail() );
-
-  iss.clear();
-  iss.seekg(p0);
-  VERIFY( !iss.fail() );
-  VERIFY( iss.tellg() == p0 );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
index 86cf286fcaa2c55dc0d042af330d1eccfbe96479..ae379e297940e5ba958b517d2c8884378d272e85 100644 (file)
@@ -39,7 +39,6 @@ void test06(void)
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
     iss.seekg(pos1);
-    iss.clear();
     VERIFY( test = !iss.fail() );
   }
 }
index fc9bf9c7d7a550748401c9e762cb75aaae144dc9..08ce84853b647a26b8693736bd7cab6b0d68457b 100644 (file)
@@ -38,7 +38,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(0, ios_base::beg);
     VERIFY( test = !iss.fail() );
   }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/26211.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/26211.cc
deleted file mode 100644 (file)
index f7b6b90..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-#include <istream>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-// libstdc++/26211
-void test01()
-{
-  using namespace std;
-  bool test __attribute__((unused)) = true;
-  
-  typedef istringstream::pos_type pos_type;
-
-  istringstream iss("Duos for Doris");
-  ostringstream oss;
-  
-  VERIFY( iss.tellg() == pos_type(0) );
-  
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-  VERIFY( iss.tellg() == pos_type(-1) );
-
-  iss.clear();
-  VERIFY( iss.tellg() == pos_type(14) );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
index ba219fcb5dd548be75a6e8d56bf392168570b134..3c46cb016b89187f13891f8b0c86dc2c4e167069 100644 (file)
@@ -41,7 +41,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.tellg();
     VERIFY( test = !iss.fail() );
   }
@@ -54,7 +53,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(0, ios_base::beg);
     VERIFY( test = !iss.fail() );
   }
@@ -67,7 +65,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(pos1);
     VERIFY( test = !iss.fail() );
   }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc
deleted file mode 100644 (file)
index c61e83e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2006 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-#include <istream>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-// libstdc++/26211
-void test01()
-{
-  using namespace std;
-  bool test __attribute__((unused)) = true;
-  
-  typedef wistringstream::pos_type pos_type;
-
-  wistringstream iss(L"Duos for Doris");
-  wostringstream oss;
-  
-  VERIFY( iss.tellg() == pos_type(0) );
-  
-  iss >> oss.rdbuf();
-  VERIFY( iss.rdstate() == iss.eofbit );
-  VERIFY( iss.tellg() == pos_type(-1) );
-
-  iss.clear();
-  VERIFY( iss.tellg() == pos_type(14) );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
index 36ed2346b7857a70e2ad672628215fbc4b1cb4b1..2566992c288c89e88613182716b076f1266ac846 100644 (file)
@@ -38,7 +38,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.tellg();
     VERIFY( test = !iss.fail() );
   }
@@ -51,7 +50,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(0, ios_base::beg);
     VERIFY( test = !iss.fail() );
   }
@@ -64,7 +62,6 @@ void test06(void)
     iss >> asNum;
     VERIFY( test = iss.eof() );
     VERIFY( test = !iss.fail() );
-    iss.clear();
     iss.seekg(pos1);
     VERIFY( test = !iss.fail() );
   }