mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Merge branch '3371-check-for-__attribute__-fallthrough-support-is-sometimes-incorrect' into 'main'
Use C2x [[fallthrough]] when supported by LLVM/clang Closes #3371 See merge request isc-projects/bind9!6338
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
#define __has_attribute(x) 0
|
||||
#endif /* if !defined(__has_attribute) */
|
||||
|
||||
#if !defined(__has_c_attribute)
|
||||
#define __has_c_attribute(x) 0
|
||||
#endif /* if !defined(__has_c_attribute) */
|
||||
|
||||
#if !defined(__has_feature)
|
||||
#define __has_feature(x) 0
|
||||
#endif /* if !defined(__has_feature) */
|
||||
@@ -61,7 +65,9 @@
|
||||
#define ISC_NONSTRING
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#if __GNUC__ >= 7 || __has_attribute(fallthrough)
|
||||
#if __has_c_attribute(fallthrough)
|
||||
#define FALLTHROUGH [[fallthrough]]
|
||||
#elif __GNUC__ >= 7 && !defined(__clang__)
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
#else
|
||||
/* clang-format off */
|
||||
|
Reference in New Issue
Block a user