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
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


--
Jon Roelofs
[email protected]
CodeSourcery / Mentor Embedded
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to