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] libstdc++/6533



David, try this: it fixes this problem for me.

tested x86/linux CXXFLAGS='-funsigned-char'


2002-05-01  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6533
	* include/bits/streambuf_iterator.h (istreambuf_iterator::equal):
	Fix.

Index: include/bits/streambuf_iterator.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/streambuf_iterator.h,v
retrieving revision 1.6
diff -c -p -r1.6 streambuf_iterator.h
*** include/bits/streambuf_iterator.h	30 Apr 2002 07:22:11 -0000	1.6
--- include/bits/streambuf_iterator.h	1 May 2002 21:13:20 -0000
*************** namespace std
*** 123,131 ****
        bool 
        equal(const istreambuf_iterator& __b) const
        {
! 	const int_type __eof = traits_type::eof();
! 	bool __thiseof = traits_type::eq_int_type(this->operator*(), __eof);
! 	bool __beof = traits_type::eq_int_type(__b.operator*(), __eof);
  	return (__thiseof && __beof || (!__thiseof && !__beof));
        }
  #endif
--- 123,131 ----
        bool 
        equal(const istreambuf_iterator& __b) const
        {
! 	const char_type __eof = traits_type::to_char_type(traits_type::eof());
! 	bool __thiseof = this->operator*() == __eof;
! 	bool __beof = __b.operator*() == __eof;
  	return (__thiseof && __beof || (!__thiseof && !__beof));
        }
  #endif


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