diff options
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 0691c8a..cb2ea92 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -198,6 +198,33 @@ int main(void) { }" HAVE_DESTRUCTOR_ATTRIBUTE) check_c_source_compiles(" +#define FALL_THROUGH __attribute__((fallthrough)) + +enum direction_e { + UP = 0, + DOWN, +}; + +int main(void) { + enum direction_e key = UP; + int i = 10; + int j = 0; + + switch (key) { + case UP: + i = 5; + FALL_THROUGH; + case DOWN: + j = i * 2; + break; + default: + break; + } + + return 0; +}" HAVE_FALLTHROUGH_ATTRIBUTE) + +check_c_source_compiles(" __thread int tls; int main(void) { |