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] Two patchlets


Hi, tested x86-linux.

Paolo.

/////
2003-04-29  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (underflow): Change to single return.
2003-04-29  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (open): Change to single return.
diff -prN libstdc++-v3-orig/include/std/std_sstream.h libstdc++-v3/include/std/std_sstream.h
*** libstdc++-v3-orig/include/std/std_sstream.h	Tue Apr 29 01:11:27 2003
--- libstdc++-v3/include/std/std_sstream.h	Tue Apr 29 19:30:56 2003
*************** namespace std
*** 190,199 ****
        virtual int_type
        underflow()
        {
  	if (this->_M_in_cur < this->_M_in_end)
! 	  return traits_type::to_int_type(*this->_M_in_cur);
  	else
! 	  return traits_type::eof();
        }
  
        // [documentation is inherited]
--- 190,201 ----
        virtual int_type
        underflow()
        {
+ 	int_type __ret;
  	if (this->_M_in_cur < this->_M_in_end)
! 	  __ret = traits_type::to_int_type(*this->_M_in_cur);
  	else
! 	  __ret = traits_type::eof();
! 	return __ret;
        }
  
        // [documentation is inherited]
diff -prN libstdc++-v3-orig/include/bits/fstream.tcc libstdc++-v3/include/bits/fstream.tcc
*** libstdc++-v3-orig/include/bits/fstream.tcc	Tue Apr 29 01:14:46 2003
--- libstdc++-v3/include/bits/fstream.tcc	Tue Apr 29 20:29:32 2003
*************** namespace std
*** 100,112 ****
  
  	      if ((__mode & ios_base::ate)
  		  && this->seekoff(0, ios_base::end, __mode) < 0)
! 		{
! 		  // 27.8.1.3,4
! 		  this->close();
! 		  return __ret;
! 		}
! 
! 	      __ret = this;
  	    }
  	}
        return __ret;
--- 100,109 ----
  
  	      if ((__mode & ios_base::ate)
  		  && this->seekoff(0, ios_base::end, __mode) < 0)
! 		// 27.8.1.3,4
! 		this->close();
! 	      else
! 		__ret = this;
  	    }
  	}
        return __ret;

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