]> Savannah Git Hosting - gnulib.git/commitdiff
regex: Use space optimization also with clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:01:01 +0000 (19:01 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:01:01 +0000 (19:01 +0200)
* lib/regex_internal.h (re_token_t): Use a single byte for the type also
with clang.

ChangeLog
lib/regex_internal.h

index 616eb5c2195254159eb44a680def0885060f94bf..d48729af6a1c77c0097eb9bc32113d16827cf4d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Use _Static_assert and static_assert primitives when present on clang.
index df5303cb4d9b3044e0b90edc0c330ad03e4a5abf..dbc503cd5564e360e5a19f6236a5ed4ec0a5a018 100644 (file)
@@ -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;