From: Bruno Haible Date: Sun, 16 Aug 2020 17:03:49 +0000 (+0200) Subject: regex: Use initializer shorthand syntax also with clang. X-Git-Tag: v1.0~3724 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d362dfdca1d98dd0a1c4cb5dfd8ff340c3c5446;p=thirdparty%2Fgnulib.git 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/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