regex: Use initializer shorthand syntax also with clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:03:49 +0000 (19:03 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:03:49 +0000 (19:03 +0200)
* lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also
with clang.

ChangeLog
lib/regcomp.c

index d48729af6a1c77c0097eb9bc32113d16827cf4d1..9bf0e78d483c67b6cb52d7c6fe6e5d8f35ee369e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       regex: Use initializer shorthand syntax also with clang.
+       * lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also
+       with clang.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        regex: Use space optimization also with clang.
index 93bb0a0538a1f010b263bc8bca108ad3e54afee0..692928b0dbf1e034535c1be2872f9a00eeffba14 100644 (file)
@@ -558,7 +558,7 @@ weak_alias (__regerror, regerror)
 static const bitset_t utf8_sb_map =
 {
   /* Set the first 128 bits.  */
-# if defined __GNUC__ && !defined __STRICT_ANSI__
+# if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__
   [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
 # else
 #  if 4 * BITSET_WORD_BITS < ASCII_CHARS