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: Inline function definitions for isdigit and isxdigit?


On 09/16/2016 05:06 AM, Florian Weimer wrote:
For isxdigit, C99 and C11 make a final determination that only '0' … '9', 'a' … 'f' and 'A' … 'F' are hexadecimal digits.

In that case, POSIX cannot override this and say that there are other hexadecimal digits. The POSIX spec for isxdigit says "Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2008 defers to the ISO C standard." So even if another part of POSIX allows more symbolic names in the xdigit character class and this would seem to contradict C99, this contradiction is unintentional and the xdigit character class must be as specified by C99.

Although glibc need not conform to the standards if there are good reasons not to, I don't see any such reasons here. Robustness and security concerns and efficiency all suggest that isxdigit can be implemented inline as you suggest.


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