aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2003-10-09 16:53:54 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-10-09 16:53:54 +0000
commit93d046861d42e9779905f7db3c575923290eedf2 (patch)
treed66520149afd41bf890245116855af0b2dccbd95 /libstdc++-v3
parentb379e7b0e97d9355f3965c740270d9196efe1b2b (diff)
downloadgcc-93d046861d42e9779905f7db3c575923290eedf2.zip
gcc-93d046861d42e9779905f7db3c575923290eedf2.tar.gz
gcc-93d046861d42e9779905f7db3c575923290eedf2.tar.bz2
[multiple changes]
2003-10-09 Benjamin Kosnik <bkoz@redhat.com> * src/string-inst.cc: Prune. * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. 2003-10-09 Petur Runolfsson <peturr02@ru.is> * src/io-inst.cc: Don't include iostream. * include/bits/ios_base.h (ios_base::failure): Use string. * src/Makefile.am: Add ios_failure.cc. * src/Makefile.in: Regenerate. * src/ios.cc: Move ios_base::failure definitions to... * src/ios_failure.cc: ...here. New. From-SVN: r72272
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog15
-rw-r--r--libstdc++-v3/include/bits/ios_base.h5
-rw-r--r--libstdc++-v3/src/Makefile.am1
-rw-r--r--libstdc++-v3/src/Makefile.in3
-rw-r--r--libstdc++-v3/src/io-inst.cc3
-rw-r--r--libstdc++-v3/src/ios.cc15
-rw-r--r--libstdc++-v3/src/ios_failure.cc48
-rw-r--r--libstdc++-v3/src/string-inst.cc37
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc2
10 files changed, 73 insertions, 58 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f367760..f4a6f5b 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,18 @@
+2003-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/string-inst.cc: Prune.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-10-09 Petur Runolfsson <peturr02@ru.is>
+
+ * src/io-inst.cc: Don't include iostream.
+ * include/bits/ios_base.h (ios_base::failure): Use string.
+ * src/Makefile.am: Add ios_failure.cc.
+ * src/Makefile.in: Regenerate.
+ * src/ios.cc: Move ios_base::failure definitions to...
+ * src/ios_failure.cc: ...here. New.
+
2003-10-09 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/9874
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index db8f9c9..43e5f9d 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -29,7 +29,7 @@
// the GNU General Public License.
//
-// ISO C++ 14882: 27.8 File-based streams
+// ISO C++ 14882: 27.4 Iostreams base classes
//
/** @file ios_base.h
@@ -178,8 +178,7 @@ namespace std
what() const throw();
private:
- enum { _S_bufsize = 256 };
- char _M_name[_S_bufsize];
+ string _M_msg;
#endif
};
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index c2453b3..a79b6df 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -103,6 +103,7 @@ sources = \
globals.cc \
io-inst.cc \
ios.cc \
+ ios_failure.cc \
istream-inst.cc \
limits.cc \
locale.cc \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 033c2d6..7a10f85 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -262,6 +262,7 @@ sources = \
globals.cc \
io-inst.cc \
ios.cc \
+ ios_failure.cc \
istream-inst.cc \
limits.cc \
locale.cc \
@@ -357,7 +358,7 @@ am__objects_2 = basic_file.lo c++locale.lo
am__objects_3 = allocator-inst.lo codecvt.lo complex_io.lo \
concept-inst.lo ctype.lo demangle.lo ext-inst.lo \
fstream-inst.lo functexcept.lo globals.lo io-inst.lo ios.lo \
- istream-inst.lo limits.lo locale.lo locale-inst.lo \
+ ios_failure.lo istream-inst.lo limits.lo locale.lo locale-inst.lo \
localename.lo misc-inst.lo ostream-inst.lo sstream-inst.lo \
stdexcept.lo stl_tree.lo streambuf-inst.lo string-inst.lo \
strstream.lo valarray-inst.lo wstring-inst.lo $(am__objects_1) \
diff --git a/libstdc++-v3/src/io-inst.cc b/libstdc++-v3/src/io-inst.cc
index 2b0e29c..0b407ef 100644
--- a/libstdc++-v3/src/io-inst.cc
+++ b/libstdc++-v3/src/io-inst.cc
@@ -1,6 +1,6 @@
// Explicit instantiation file.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,7 +34,6 @@
#include <ios>
#include <iomanip>
-#include <iostream>
namespace std
{
diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc
index 9dd0ecb..ee28205 100644
--- a/libstdc++-v3/src/ios.cc
+++ b/libstdc++-v3/src/ios.cc
@@ -149,19 +149,6 @@ namespace std
int ios_base::Init::_S_ios_base_init = 0;
bool ios_base::Init::_S_synced_with_stdio = true;
- ios_base::failure::failure(const string& __str) throw()
- {
- strncpy(_M_name, __str.c_str(), _S_bufsize);
- _M_name[_S_bufsize - 1] = '\0';
- }
-
- ios_base::failure::~failure() throw()
- { }
-
- const char*
- ios_base::failure::what() const throw()
- { return _M_name; }
-
ios_base::Init::Init()
{
if (_S_ios_base_init == 0)
@@ -398,4 +385,4 @@ namespace std
}
return __ret;
}
-} // namespace std
+} // namespace std
diff --git a/libstdc++-v3/src/ios_failure.cc b/libstdc++-v3/src/ios_failure.cc
new file mode 100644
index 0000000..0d99ba3
--- /dev/null
+++ b/libstdc++-v3/src/ios_failure.cc
@@ -0,0 +1,48 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.4.2.1.1 Class ios_base::failure
+//
+
+#include <ios>
+
+namespace std
+{
+ ios_base::failure::failure(const string& __str) throw()
+ : _M_msg(__str) { }
+
+ ios_base::failure::~failure() throw()
+ { }
+
+ const char*
+ ios_base::failure::what() const throw()
+ { return _M_msg.c_str(); }
+} // namespace std
diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc
index 3fcaf51..ec17e54 100644
--- a/libstdc++-v3/src/string-inst.cc
+++ b/libstdc++-v3/src/string-inst.cc
@@ -1,6 +1,6 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -73,23 +73,6 @@ namespace std
template
S::basic_string(S::iterator, S::iterator, const allocator<C>&);
- template
- S::basic_string(S::const_iterator, S::const_iterator, const allocator<C>&);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator,
- input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator, input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag);
-
template
S&
S::_M_replace(S::iterator, S::iterator, const C*, const C*,
@@ -99,15 +82,6 @@ namespace std
S&
S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, C*, C*);
-
template
S&
S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);
@@ -117,11 +91,6 @@ namespace std
S::_S_construct(S::iterator, S::iterator,
const allocator<C>&, forward_iterator_tag);
- template
- C*
- S::_S_construct(S::const_iterator, S::const_iterator,
- const allocator<C>&, forward_iterator_tag);
-
template
C*
S::_S_construct(C*, C*, const allocator<C>&, forward_iterator_tag);
@@ -130,8 +99,4 @@ namespace std
C*
S::_S_construct(const C*, const C*, const allocator<C>&,
forward_iterator_tag);
-
- template
- void
- __destroy_aux<S*>(S*, S*, __false_type);
} // namespace std
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
index f0baf75..fe7a8ef 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
@@ -41,5 +41,5 @@ void test01()
io1 = io2;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 748 }
+// { dg-error "is private" "" { target *-*-* } 747 }
// { dg-error "operator=" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
index 08865db..55033f9 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
@@ -41,5 +41,5 @@ void test02()
test_base io2 = io1;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 745 }
+// { dg-error "is private" "" { target *-*-* } 744 }
// { dg-error "copy constructor" "" { target *-*-* } 0 }