On glibc, the bits used for the various character classes is endian dependant
(see _ISbit() in ctypes.h) but __regex_word does not account for this and uses
a spare bit that isn't spare on big-endian. On big-endian, it overlaps with the
bit for graphic characters which causes '-', '@', etc. to be considered a word
character.
Fixed this by defining the value using _ISbit(15) on glibc systems.
Fixes PR26476.
The static_cast is necessary to silence a false-positive warning on little-endian. _ISbit(15) expands to:
which simplifies to:
Clang warns about the truncation of the 0x800000 to char_class_type (unsigned short) even though this value doesn't matter.