1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-05 19:35:52 +03:00

posix: Fix regex_internal.h on bootstrap

Only define FALLTHROUGH for _LIBC and do not check __clang_major__
value.

It partially syncs with gnulib 5c52f00c69f39fe.

Checked with build-many-glibcs.py for aarch64-linux-gnu,
x86_64-linux-gnu, and s390x-linux-gnu.
This commit is contained in:
Adhemerval Zanella
2021-01-20 12:55:17 +00:00
parent 22b79ed7f4
commit 1006250ea2

View File

@@ -848,12 +848,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
} }
#endif /* RE_ENABLE_I18N */ #endif /* RE_ENABLE_I18N */
#ifndef FALLTHROUGH #ifdef _LIBC
# if (__GNUC__ >= 7) || (__clang_major__ >= 10) # if __GNUC__ >= 7
# define FALLTHROUGH __attribute__ ((__fallthrough__)) # define FALLTHROUGH __attribute__ ((__fallthrough__))
# else # else
# define FALLTHROUGH ((void) 0) # define FALLTHROUGH ((void) 0)
# endif # endif
#else
# include "attribute.h"
#endif #endif
#endif /* _REGEX_INTERNAL_H */ #endif /* _REGEX_INTERNAL_H */