diff --git a/include/wx/defs.h b/include/wx/defs.h index 4cee732ff6..bdf417e3ce 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -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) - #define wxFALLTHROUGH [[clang::fallthrough]] - #endif +#if __cplusplus >= 201703L + #define wxFALLTHROUGH [[fallthrough]] +#elif __cplusplus >= 201103L && defined(__has_warning) && WX_HAS_CLANG_FEATURE(cxx_attributes) + #define wxFALLTHROUGH [[clang::fallthrough]] +#elif wxCHECK_GCC_VERSION(7, 0) + #define wxFALLTHROUGH __attribute__ ((fallthrough)) #endif #ifndef wxFALLTHROUGH