This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH][RFC] Avoid table lookup in isascii, isxdigit.


On 04/12/13 13:42, Rich Felker wrote:
> #define isdigit(c) ((unsigned)(c)-'0'<10)

Unfortunately, this implementation mishandles some
obscure usages, e.g.,:

   double eof = EOF;
   return isdigit (eof);

on systems where the implementation raises a signal
when converting an out-of-range floating-point value
to unsigned.


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