On Jan 18, 2013, at 16:52 , Richard Smith <[email protected]> wrote:

> On Fri, Jan 18, 2013 at 2:56 PM, Jordan Rose <[email protected]> wrote:
>> This is converging, so I'm putting it up on Phabricator for better 
>> spot-comments. E-mail review still welcome as well, of course.
>> 
>> http://llvm-reviews.chandlerc.com/D312
>> 
>> 
>>>> One thing I missed before: please don't use iscntrl or isxdigit;
>>>> they're dependent on the current locale (and to be safe, don't use
>>>> isascii either).
>>> 
>>> I understand for iscntrl, but isascii appears a lot and the expanded form 
>>> is ugly. I guess I'll write my own wrapper.
>> 
>> …do I have to? :-D isascii seems pretty obvious as to its intent, and it's 
>> specified to be locale-independent.
> 
> Here's what POSIX says:
> 
> APPLICATION USAGE
> 
> The isascii() function cannot be used portably in a localized application.
> 
> FUTURE DIRECTIONS
> 
> The isascii() function may be removed in a future version.
> 
> CHANGE HISTORY
> 
> Issue 7
> 
> The isascii() function is marked obsolescent.

Ha, okay. Busted by the standard.

static inline bool isASCII(char C) {
  return (signed char)C >= 0;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to