[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
improve clang support (38)
From: |
Bruno Haible |
Subject: |
improve clang support (38) |
Date: |
Sun, 16 Aug 2020 19:04:33 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; ) |
clang support the array initialization shorthand syntax
[ first ... last ] = value
<https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Designated-Inits.html>,
at least in clang >= 4.
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.
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 93bb0a0..692928b 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- improve clang support (38),
Bruno Haible <=