diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-22 11:21:44 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-22 11:22:30 -0800 |
commit | 0285e6bdf223314d7751a83795001c0e87a1f825 (patch) | |
tree | 5870edf990eaf76bf8019effeef0b8cf3c529bf4 /posix/regcomp.c | |
parent | 4bae615022cb5a5da79ccda83cc6c9ba9f2d479c (diff) | |
download | glibc-0285e6bdf223314d7751a83795001c0e87a1f825.zip glibc-0285e6bdf223314d7751a83795001c0e87a1f825.tar.gz glibc-0285e6bdf223314d7751a83795001c0e87a1f825.tar.bz2 |
* posix/regcomp.c (init_word_char): Add comments.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r-- | posix/regcomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c index 520596b..81c2932 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -925,12 +925,15 @@ init_word_char (re_dfa_t *dfa) int ch = 0; if (BE (dfa->map_notascii == 0, 1)) { + /* Avoid uint32_t and uint64_t as some non-GCC platforms lack + them, an issue when this code is used in Gnulib. */ bitset_word_t bits0 = 0x00000000; bitset_word_t bits1 = 0x03ff0000; bitset_word_t bits2 = 0x87fffffe; bitset_word_t bits3 = 0x07fffffe; if (BITSET_WORD_BITS == 64) { + /* Pacify gcc -Woverflow on 32-bit platformns. */ dfa->word_char[0] = bits1 << 31 << 1 | bits0; dfa->word_char[1] = bits3 << 31 << 1 | bits2; i = 2; |