[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
This commit is contained in:
parent
b379e7b0e9
commit
93d046861d
@ -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
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
@ -103,6 +103,7 @@ sources = \
|
||||
globals.cc \
|
||||
io-inst.cc \
|
||||
ios.cc \
|
||||
ios_failure.cc \
|
||||
istream-inst.cc \
|
||||
limits.cc \
|
||||
locale.cc \
|
||||
|
@ -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) \
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
|
48
libstdc++-v3/src/ios_failure.cc
Normal file
48
libstdc++-v3/src/ios_failure.cc
Normal file
@ -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
|
@ -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
|
||||
|
@ -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 }
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user