This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] PR 11584


>2004-01-26  Jerry Quinn  <jlquinn@optonline.net>
>
>	PR libstdc++/11584
>	* include/bits/ios_base.h (ios_base::_M_grow_words):  Add
>        iword/pword selector.
>	(ios_base::iword, ios_base::pword):  Use it.
>	* src/ios.cc (ios_base::_M_grow_words):  Clear _M_word_zero
>        iword or pword member on alloc failure.
>	* testsuite/27_io/ios_base/storage/11584.cc:  New test.

ok but

>+		if (iword) _M_word_zero._M_iword = 0;

if (iword)
  _M_word_zero._M_iword = 0;

>+		else _M_word_zero._M_pword = 0;

else
  _M_word_zero._M_pword = 0;

> 		return _M_word_zero;
> 	      }
> 	    for (int i = 0; i < _M_word_size; i++) 
>@@ -180,7 +182,9 @@
> 	    _M_streambuf_state |= badbit;
> 	    if (_M_streambuf_state & _M_exception)
> 	      __throw_ios_failure("ios_base::_M_grow_words is not valid");
>+	    if (iword) _M_word_zero._M_iword = 0;
>+	    else _M_word_zero._M_pword = 0;
> 	    return _M_word_zero;
> 	  }
>       }

same.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]