This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: some 64-bit-ness in libio
- To: jakub at redhat dot com
- Subject: Re: some 64-bit-ness in libio
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Mon, 8 May 2000 09:02:18 -0700 (PDT)
- Cc: chris at lslsun dot epfl dot ch (Christian Iseli), gcc at gcc dot gnu dot org
On Thu, May 04, 2000 at 04:35:43PM +0200, Christian Iseli wrote:
> > While trying the testsuite on the latest GCC snapshot on an alpha
> > machine, I noticed that a lot of the tests fail because of an int
> > to pointer conversion warning in the libio/streambuf.h file.
> >
> > I don't know if this is the correct fix, but I'd like to propose
> > the following patch.
Jakub writes:
> I have submitted similar patch quite some time ago, see
> http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00745.html
> but it was not acked yet.
NO! Please do not integrate this patch! What it does is to remove
evidence that a bug has been introduced into the compiler. We should
never change the testsuite unless we can prove that there is something
wrong with the test. In this case, there is nothing wrong with the code
you propose to replace.
If new, annoying warnings appear when running the test suite, they will
also appear when users run the compiler on actual code, and the users
aren't going to like it.
> > --- libio/streambuf.h.chris Thu May 4 16:22:11 2000
> > +++ libio/streambuf.h Thu May 4 16:22:53 2000
> > @@ -219,7 +219,7 @@ class ios : public _ios_fields {
> > int fail() const { return _state & (ios::badbit|ios::failbit); }
> > int bad() const { return _state & ios::badbit; }
> > iostate rdstate() const { return _state; }
> > - operator void*() const { return fail() ? (void*)0 : (void*)(-1); }
> > + operator void*() const { return fail() ? (void*)0L : (void*)(-1L); }
> > int operator!() const { return fail(); }
> > iostate exceptions() const { return _exceptions; }
> > void exceptions(iostate enable) {