@mclow.lists AFAICT, for Newlib, it's not possible for isblank to match between 
the c and c++ libs here (without the separate table) because '\t' doesn't have 
_B set in the table, but `isblank(int)` is defined like this:

  int isblank(int c) {
    return ((__ctype_ptr__[c+1] & _B) || (c == '\t'));
  }

so `ctype<char>::is(ctype_base::blank, '\t')` would return false, whereas 
`isblank('\t')` would return true. Using a libc++-provided table, this problem 
goes away. I think Bionic has the same issue.

We could put in exhaustive checks that the two match, but I'm not convinced 
that failing that sort of test really means anything... we're allowed to differ 
here, right?

There was another case where I thought we absolutely needed a separate table 
(having to do with Newlib's masks not being true bitmasks), but my notes on the 
subject are only confusing me more :(


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8129

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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

Reply via email to