This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix collate_members_char[wchar_t].cc
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 14 Mar 2002 18:39:31 +0100
- Subject: Re: [PATCH] Fix collate_members_char[wchar_t].cc
- References: <Pine.SOL.3.91.1020314092819.9423A-100000@taarna.cygnus.com>
Benjamin Kosnik wrote:
> > > > > > - VERIFY(i1 == i2);
> > > > > > + VERIFY(i2 == 1);
> > >
> > > The original code is correct and according to what you just said it
> > > would work for you as well. So dump the change and use the original
> > > VERIFY.
> >
> > Sorry. I think there is a misunderstanding. I cannot use the original VERIFY
> > because string::compare does /not/ normalize! (I don't have the standard here,
> > but, f.i., Josuttis, p. 511).
>
> So, shouldn't it be
>
> + VERIFY(i2 > 0);
>
> ?
Hi Benjamin. Well, I think VERIFY(i2 == +1) (or -1 in the other testcase) is
better, in that, whereas the value computed by string::compare is /not/ normalized,
that of collate::compare /is/ normalized (it wasn't in v3, wrongly, before mine and
Uli's recent patch)
Do you agree?
Ciao, Paolo.