summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-10-14 08:04:10 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-10-14 08:04:10 +0200
commited3da54e1d05522b1a200f84de4b2309732bca04 (patch)
tree6dfa816dab761e0ed0780a2b40215f389e8c46da
parent5aad2f56499450a938528490d7c88e0990152a17 (diff)
downloadcython-ed3da54e1d05522b1a200f84de4b2309732bca04.tar.gz
Tighten preprocessor check that avoids the "fallthrough" C compiler warnings.
Closes #1930.
-rw-r--r--Cython/Utility/ModuleSetupCode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 951a59b67..e243dddb3 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -516,7 +516,7 @@
#endif
#ifndef CYTHON_FALLTHROUGH
- #if !defined(_MSC_VER) && __has_attribute(fallthrough)
+ #if (defined(__GNUC__) || defined(__clang__)) && __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH