This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[v3] Fix libstdc++/9659


Hi,

tested x86-linux, reviewd by myself and Nathan (thanks!)

Paolo.

//////////
2003-02-11  Scott Snyder  <snyder@fnal.gov>

	PR libstdc++/9659
	* include/bits/fstream.tcc (seekoff): Avoid operator+
	for pos_type.
*** fstream.tcc.~1.47.~	Tue Feb  4 23:42:32 2003
--- fstream.tcc	Tue Feb 11 12:06:29 2003
*************** namespace std
*** 456,464 ****
  	      pos_type __tmp =
  		_M_file.seekoff(__off, ios_base::cur, __mode);
  	      if (__tmp >= 0)
! 		// Seek successful.
! 		__ret = __tmp +
! 		  std::max(this->_M_out_cur, this->_M_in_cur) - _M_filepos;
  	    }
  	}
        _M_last_overflowed = false;	
--- 456,467 ----
  	      pos_type __tmp =
  		_M_file.seekoff(__off, ios_base::cur, __mode);
  	      if (__tmp >= 0)
! 		{
! 		  // Seek successful.
! 		  __ret = __tmp;
! 		  __ret +=
! 		    std::max(this->_M_out_cur, this->_M_in_cur) - _M_filepos;
! 		}
  	    }
  	}
        _M_last_overflowed = false;	

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