diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-14 08:04:10 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-14 08:04:10 +0200 |
commit | ed3da54e1d05522b1a200f84de4b2309732bca04 (patch) | |
tree | 6dfa816dab761e0ed0780a2b40215f389e8c46da | |
parent | 5aad2f56499450a938528490d7c88e0990152a17 (diff) | |
download | cython-ed3da54e1d05522b1a200f84de4b2309732bca04.tar.gz |
Tighten preprocessor check that avoids the "fallthrough" C compiler warnings.
Closes #1930.
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 2 |
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 |