[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
improve clang support (37)
From: |
Bruno Haible |
Subject: |
improve clang support (37) |
Date: |
Sun, 16 Aug 2020 19:01:35 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; ) |
clang supports struct members whose type is an enum, with a bitfield width.
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.
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index df5303c..dbc503c 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- improve clang support (37),
Bruno Haible <=