From: Bruno Haible Date: Sun, 16 Aug 2020 17:01:01 +0000 (+0200) Subject: regex: Use space optimization also with clang. X-Git-Tag: v1.0~3725 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=450cda0298fb197b019004c354c1f5774463559d;p=gnulib.git regex: Use space optimization also with clang. * lib/regex_internal.h (re_token_t): Use a single byte for the type also with clang. --- diff --git a/ChangeLog b/ChangeLog index 616eb5c219..d48729af6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-16 Bruno Haible + + regex: Use space optimization also with clang. + * lib/regex_internal.h (re_token_t): Use a single byte for the type also + with clang. + 2020-08-16 Bruno Haible Use _Static_assert and static_assert primitives when present on clang. diff --git a/lib/regex_internal.h b/lib/regex_internal.h index df5303cb4d..dbc503cd55 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -335,7 +335,7 @@ typedef struct Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; -#if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +#if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type;