[PATCH] [libcxx] Fix ctype_byname<wchar_t>::do_is() mask checking.

Jonathan Roelofs jonathan at codesourcery.com
Tue Aug 26 12:51:42 PDT 2014


I don't think this is correct. IIRC, the value of 'm' coming in is a mask. To 
fix this, all of the tests need to be of this form:

if ((m & space) == space) result |= (iswspace_l(ch, __l) != 0);

Newlib also has this problem... Sorry I didn't bring this up sooner.


Cheers,

Jon

On 8/26/14, 12:39 PM, Dan Albert wrote:
> Hi mclow.lists, EricWF,
>
> The previous method was very dependent on how the ctype masks were defined. For example, Android has print defined as `(punct | upper | lower | digit | blank)`. When calling `do_is(upper, L'a')`, result would be set to true by `if (upper & print) result |= iswprint_l(L'a', __l)`;
>
> http://reviews.llvm.org/D5071
>
> Files:
>    src/locale.cpp
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-commits mailing list