This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

ctype<wchar>::do_is(const wchar_t *, const wchar_t *, mask *) problem


Hello,

I am getting testsuite failures on
22_locale/ctype/is/wchar_t/wrapped_env.cc.

This test case does:

  cc0 = strlit01;
  cc1 = gctype.is(cc0, cc0 + 13, m02);
  VERIFY( cc1 == strlit01 + 13);

which as far as I understand the C++ standard is supposed to fill the m02
array with codes classifying the characters from strlit01.

However, the implementation that is being called (located in the source
file config/locale/gnu/ctype_members.cc) does this:

  const wchar_t*
  ctype<wchar_t>::
  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const
  {
    while (__lo < __hi && !this->do_is(*__m, *__lo))
      ++__lo;
    return __lo;
  }

which doesn't appear to be correct (__m is used as input parameter,
not output; only the first element of __m is ever used) ...


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich dot Weigand at de dot ibm dot com


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