mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 07:14:09 +08:00
ios.cc (ios_base::_M_init): Remove _M_word_size.
2003-03-06 Jerry Quinn <jlquinn@optonline.net> * src/ios.cc (ios_base::_M_init): Remove _M_word_size. (ios_base::ios_base): Set _M_word, _M_word_size. (ios_base::~ios_base): Remove redundant test. * testsuite/27_io/ios_base_storage.cc (test03): New. From-SVN: r63896
This commit is contained in:
parent
2085604548
commit
53ec7ec1f1
@ -1,3 +1,10 @@
|
||||
2003-03-06 Jerry Quinn <jlquinn@optonline.net>
|
||||
|
||||
* src/ios.cc (ios_base::_M_init): Remove _M_word_size.
|
||||
(ios_base::ios_base): Set _M_word, _M_word_size.
|
||||
(ios_base::~ios_base): Remove redundant test.
|
||||
* testsuite/27_io/ios_base_storage.cc (test03): New.
|
||||
|
||||
2003-03-04 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* src/strstream.cc, include/bits/basic_string.tcc: Remove
|
||||
|
@ -288,7 +288,6 @@ namespace std
|
||||
_M_width = 0;
|
||||
_M_flags = skipws | dec;
|
||||
_M_callbacks = 0;
|
||||
_M_word_size = 0;
|
||||
_M_ios_locale = locale();
|
||||
}
|
||||
|
||||
@ -302,7 +301,8 @@ namespace std
|
||||
return __old;
|
||||
}
|
||||
|
||||
ios_base::ios_base() : _M_callbacks(0), _M_word(0), _M_locale_cache(0)
|
||||
ios_base::ios_base() : _M_callbacks(0), _M_word(_M_local_word),
|
||||
_M_word_size(_S_local_word_size), _M_locale_cache(0)
|
||||
{
|
||||
// Do nothing: basic_ios::init() does it.
|
||||
// NB: _M_callbacks and _M_word must be zero for non-initialized
|
||||
@ -314,7 +314,7 @@ namespace std
|
||||
{
|
||||
_M_call_callbacks(erase_event);
|
||||
_M_dispose_callbacks();
|
||||
if (_M_word && _M_word != _M_local_word)
|
||||
if (_M_word != _M_local_word)
|
||||
{
|
||||
delete [] _M_word;
|
||||
_M_word = 0;
|
||||
|
@ -91,10 +91,25 @@ void test02()
|
||||
VERIFY( l == 0 );
|
||||
}
|
||||
|
||||
class derived : public std::ios_base
|
||||
{
|
||||
public:
|
||||
derived() {}
|
||||
};
|
||||
|
||||
void test03()
|
||||
{
|
||||
derived d;
|
||||
|
||||
d.pword(0) = &d;
|
||||
d.iword(0) = 1;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
__gnu_cxx_test::set_memory_limits();
|
||||
test01();
|
||||
test02();
|
||||
test03();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user