[v3] alpha/powerpc/x86 parity for 27_io
Benjamin Kosnik
bkoz@redhat.com
Tue Jun 12 18:15:00 GMT 2001
...this fixes the extraneous fails on non-x86 targets. I've tested on
powerpc, and it fixes it there. I expect the same results on
alpha. I'll soon see from gcc-testresults.
Loren, this should fix it, please give it a go.
Mark. Yep. I'd like this in.
tested x86/linux
tested powerpc/linux
(operators+/- were returning a reference, and should just return fpos)
2001-06-12 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/fpos.h (fpos::operator-): Don't return reference,
return original, non-modified version.
(fpos::operator+): Same.
Index: include/bits/fpos.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/fpos.h,v
retrieving revision 1.5
diff -c -p -r1.5 fpos.h
*** fpos.h 2001/03/07 22:22:41 1.5
--- fpos.h 2001/06/13 01:07:25
*************** namespace std
*** 52,59 ****
typedef _StateT __state_type;
private:
- __state_type _M_st;
streamoff _M_off;
public:
__state_type
--- 52,59 ----
typedef _StateT __state_type;
private:
streamoff _M_off;
+ __state_type _M_st;
public:
__state_type
*************** namespace std
*** 64,73 ****
// NB: The standard defines only the implicit copy ctor and the
// previous two members. The rest is a "conforming extension".
! fpos(): _M_st(__state_type()), _M_off(streamoff()) { }
fpos(streamoff __off, __state_type __st = __state_type())
! : _M_st(__st), _M_off(__off) { }
operator streamoff() const { return _M_off; }
--- 64,73 ----
// NB: The standard defines only the implicit copy ctor and the
// previous two members. The rest is a "conforming extension".
! fpos(): _M_off(streamoff()), _M_st(__state_type()) { }
fpos(streamoff __off, __state_type __st = __state_type())
! : _M_off(__off), _M_st(__st) { }
operator streamoff() const { return _M_off; }
*************** namespace std
*** 77,94 ****
fpos&
operator-=(streamoff __off) { _M_off -= __off; return *this; }
! fpos&
operator+(streamoff __off)
{
! fpos t(*this);
! return t += __off;
}
! fpos&
operator-(streamoff __off)
{
! fpos t(*this);
! return t -= __off;
}
bool
--- 77,96 ----
fpos&
operator-=(streamoff __off) { _M_off -= __off; return *this; }
! fpos
operator+(streamoff __off)
{
! fpos __t(*this);
! __t += __off;
! return __t;
}
! fpos
operator-(streamoff __off)
{
! fpos __t(*this);
! __t -= __off;
! return __t;
}
bool
More information about the Gcc-patches
mailing list