Better fallthrough annotation macro.
This commit is contained in:
@@ -55,8 +55,13 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
|
||||
# define off64_t off_t
|
||||
#endif
|
||||
|
||||
#if !defined (__APPLE__) && !defined(__clang__)
|
||||
# define FALLTHROUGH_ANNOTATION
|
||||
#if __has_attribute(fallthrough)
|
||||
# define fallthrough __attribute__((fallthrough))
|
||||
#else
|
||||
# if __has_attribute(__fallthrough__)
|
||||
# define fallthrough __attribute__((__fallthrough__))
|
||||
# endif
|
||||
# define fallthrough do {} while (0) /* fallthrough */
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
@@ -18,8 +18,13 @@
|
||||
#ifndef EMU_PLAT_FALLTHROUGH_H
|
||||
#define EMU_PLAT_FALLTHROUGH_H
|
||||
|
||||
#if !defined (__APPLE__) && !defined(__clang__)
|
||||
# define FALLTHROUGH_ANNOTATION
|
||||
#if __has_attribute(__fallthrough__)
|
||||
# define fallthrough __attribute__((__fallthrough__))
|
||||
#else
|
||||
# if __has_attribute(fallthrough)
|
||||
# define fallthrough __attribute__((fallthrough))
|
||||
# endif
|
||||
# define fallthrough do {} while (0) /* fallthrough */
|
||||
#endif
|
||||
|
||||
#endif /*EMU_PLAT_FALLTHROUGH_H*/
|
||||
|
||||
Reference in New Issue
Block a user