summaryrefslogtreecommitdiff
path: root/lib/regex_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r--lib/regex_internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index f6ebfb003e8..9a0c2ed97c8 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -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