Define wxFALLTHROUGH for more compilers
Avoids -Wimplicit-fallthrough warning with GCC 7
This commit is contained in:
parent
cb799483b7
commit
4ec80a35f9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user