diff options
Diffstat (limited to 'support/regex_internal.h')
-rw-r--r-- | support/regex_internal.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/support/regex_internal.h b/support/regex_internal.h index 8c42586c..dbc503cd 100644 --- a/support/regex_internal.h +++ b/support/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; @@ -841,10 +841,10 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) #endif /* RE_ENABLE_I18N */ #ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else +# if (__GNUC__ >= 7) || (__clang_major__ >= 10) # define FALLTHROUGH __attribute__ ((__fallthrough__)) +# else +# define FALLTHROUGH ((void) 0) # endif #endif |