(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)

This commit is contained in:
frosch
2017-08-13 18:38:42 +00:00
parent 19bae485b0
commit b4b98e5165
60 changed files with 221 additions and 121 deletions

View File

@@ -156,6 +156,17 @@
#else
#define FINAL
#endif
/* Use fallthrough attribute where supported */
#if __GNUC__ >= 7
#if __cplusplus > 201402L // C++17
#define FALLTHROUGH [[fallthrough]]
#else
#define FALLTHROUGH __attribute__((fallthrough))
#endif
#else
#define FALLTHROUGH
#endif
#endif /* __GNUC__ */
#if defined(__WATCOMC__)
@@ -164,6 +175,7 @@
#define GCC_PACK
#define WARN_FORMAT(string, args)
#define FINAL
#define FALLTHROUGH
#include <malloc.h>
#endif /* __WATCOMC__ */
@@ -235,6 +247,13 @@
#define WARN_FORMAT(string, args)
#define FINAL sealed
/* fallthrough attribute, VS 2017 */
#if (_MSC_VER >= 1910)
#define FALLTHROUGH [[fallthrough]]
#else
#define FALLTHROUGH
#endif
#if defined(WINCE)
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif