diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-19 18:35:30 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-19 18:37:02 -0800 |
commit | 5c52f00c69f39fe86ec087654893087a83290ee7 (patch) | |
tree | e96d9178880d21afc906d326e01497b89387403c /lib/fnmatch.c | |
parent | 2ef5a9b4b25381bc4805adf13f9f3a266af9c313 (diff) | |
download | gnulib-5c52f00c69f39fe86ec087654893087a83290ee7.tar.gz |
fnmatch, regex, fts: FALLTHROUGH consistency
Be more consistent about how FALLTHROUGH is defined.
For Gnulib, use attribute.h. For glibc, use __GNUC__ >= 7.
Problem for glibc reported by Vaseeharan Vinayagamoorthy in:
https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html
* lib/fnmatch.c (FALLTHROUGH) [_LIBC]:
* lib/regex_internal.h (FALLTHROUGH) [_LIBC]:
Don’t worry about Clang, as it’s not needed and provokes GCC.
* lib/fts.c (FALLTHROUGH) [!_LIBC]:
* lib/regex_internal.h (FALLTHROUGH) [!_LIBC]:
Rely on attribute.h for FALLTHROUGH
* modules/regex: Depend on attribute module.
Diffstat (limited to 'lib/fnmatch.c')
-rw-r--r-- | lib/fnmatch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fnmatch.c b/lib/fnmatch.c index 5896812c96..b8a71f164d 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -64,7 +64,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); #endif #ifdef _LIBC -# if (__GNUC__ >= 7) || (__clang_major__ >= 10) +# if __GNUC__ >= 7 # define FALLTHROUGH __attribute__ ((__fallthrough__)) # else # define FALLTHROUGH ((void) 0) |