Mercurial > gnulib
changeset 39161:73a94829c5ff
regex: merge from glibc
* lib/regcomp.c (init_word_char): Add comments.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 22 Nov 2017 11:23:01 -0800 |
parents | 1dc02097f427 |
children | efff996688b8 |
files | ChangeLog lib/regcomp.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Nov 20 15:56:22 2017 -0800 +++ b/ChangeLog Wed Nov 22 11:23:01 2017 -0800 @@ -1,3 +1,8 @@ +2017-11-22 Paul Eggert <eggert@cs.ucla.edu> + + regex: merge from glibc + * lib/regcomp.c (init_word_char): Add comments. + 2017-11-20 Paul Eggert <eggert@cs.ucla.edu> regex: merge from glibc
--- a/lib/regcomp.c Mon Nov 20 15:56:22 2017 -0800 +++ b/lib/regcomp.c Wed Nov 22 11:23:01 2017 -0800 @@ -945,12 +945,15 @@ dfa->word_ops_used = 1; 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;