+2020-08-09 Bruno Haible <bruno@clisp.org>
+
+ Silence warnings from clang 10 with -Wimplicit-fallthrough.
+ * lib/dfa.c (FALLTHROUGH): Use __attribute__ __fallthrough__ also on
+ clang >= 10.
+ * lib/fnmatch.c (FALLTHROUGH): Likewise.
+ * lib/fts.c (FALLTHROUGH): Likewise.
+ * tests/macros.h (FALLTHROUGH): Likewise.
+ * lib/regex_internal.h (FALLTHROUGH): Likewise.
+ * config/srclist.txt: Mark it as needing sync with glibc.
+
2020-08-09 Bruno Haible <bruno@clisp.org>
stdbool tests: Enable the stricter tests also on clang.
$LIBCSRC posix/regex.c lib
$LIBCSRC posix/regex.h lib
$LIBCSRC posix/regex_internal.c lib
-$LIBCSRC posix/regex_internal.h lib
+#$LIBCSRC posix/regex_internal.h lib
$LIBCSRC posix/regexec.c lib
$LIBCSRC time/timegm.c lib
$LIBCSRC time/mktime.c lib
#ifndef FALLTHROUGH
# if 201710L < __STDC_VERSION__
# define FALLTHROUGH [[__fallthrough__]]
-# elif __GNUC__ < 7
-# define FALLTHROUGH ((void) 0)
-# else
+# elif (__GNUC__ >= 7) || (__clang_major__ >= 10)
# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+# define FALLTHROUGH ((void) 0)
# endif
#endif
#endif
#ifdef _LIBC
-# if __GNUC__ < 7
-# define FALLTHROUGH ((void) 0)
-# else
+# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+# define FALLTHROUGH ((void) 0)
# endif
#else
# include "attribute.h"
#endif
#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
#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
#include <stdlib.h>
#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