From 3d362dfdca1d98dd0a1c4cb5dfd8ff340c3c5446 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Aug 2020 19:03:49 +0200 Subject: [PATCH] regex: Use initializer shorthand syntax also with clang. * lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also with clang. --- ChangeLog | 6 ++++++ lib/regcomp.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d48729af6a..9bf0e78d48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-16 Bruno Haible + + 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 regex: Use space optimization also with clang. diff --git a/lib/regcomp.c b/lib/regcomp.c index 93bb0a0538..692928b0db 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 -- 2.39.5