forked from wolfSSL/wolfssl
Fix to only use FALL_THROUGH macro for GCC 7.1 or later.
This commit is contained in:
@@ -162,13 +162,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GCC 7 has new switch() fall-through detection */
|
/* GCC 7 has new switch() fall-through detection */
|
||||||
#ifndef FALL_THROUGH
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#define FALL_THROUGH __attribute__ ((fallthrough))
|
#if ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
||||||
#else
|
#define FALL_THROUGH __attribute__ ((fallthrough));
|
||||||
#define FALL_THROUGH
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FALL_THROUGH
|
||||||
|
#define FALL_THROUGH
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
||||||
|
Reference in New Issue
Block a user