]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* posix/regcomp.c (init_word_char): Add comments.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Nov 2017 19:21:44 +0000 (11:21 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Nov 2017 19:22:30 +0000 (11:22 -0800)
ChangeLog
posix/regcomp.c

index 013d1e47e59382944ab9dd93513c6997209879fe..e67b128fe629162317bb2f6f11f3f43a75c16331 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * posix/regcomp.c (init_word_char): Add comments.
+
 2017-11-22  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #22447]
index 520596b51b3e3d203a8c5fbd1e5cb235d9493944..81c29329911ab4e985dfe10493cfe905f5c2f8bb 100644 (file)
@@ -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;