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]

[Patch] Fix libstdc++/9659


Hi,

this one, pretty obvious, fixes a regression introduced
recently by myself :(

Weird that it only shows up at -O3 and could not be noticed
running the testsuite.

If nobody objects will apply today to both trunk and 3_3.

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]