Define wxFALLTHROUGH for more compilers

Avoids -Wimplicit-fallthrough warning with GCC 7
This commit is contained in:
Paul Cornett 2017-10-17 09:21:03 -07:00
parent cb799483b7
commit 4ec80a35f9

View File

@ -287,10 +287,12 @@ typedef short int WXTYPE;
/* wxFALLTHROUGH is used to notate explicit fallthroughs in switch statements */
#if __cplusplus >= 201103L && defined(__has_warning)
#if WX_HAS_CLANG_FEATURE(cxx_attributes)
#if __cplusplus >= 201703L
#define wxFALLTHROUGH [[fallthrough]]
#elif __cplusplus >= 201103L && defined(__has_warning) && WX_HAS_CLANG_FEATURE(cxx_attributes)
#define wxFALLTHROUGH [[clang::fallthrough]]
#endif
#elif wxCHECK_GCC_VERSION(7, 0)
#define wxFALLTHROUGH __attribute__ ((fallthrough))
#endif
#ifndef wxFALLTHROUGH