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/fts.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/fts.c')
-rw-r--r-- | lib/fts.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -200,8 +200,8 @@ enum Fts_stat while (false) #endif -#ifndef FALLTHROUGH -# if (__GNUC__ >= 7) || (__clang_major__ >= 10) +#ifdef _LIBC +# if __GNUC__ >= 7 # define FALLTHROUGH __attribute__ ((__fallthrough__)) # else # define FALLTHROUGH ((void) 0) |