Commit 5aad2f56 authored by Stefan Behnel's avatar Stefan Behnel

Simplify preprocessor code that avoids the "fallthrough" C compiler warnings,...

Simplify preprocessor code that avoids the "fallthrough" C compiler warnings, assuming that "__has_attribute()" is widely supported these days. At least GCC 5.x and clang seem to have it.
Closes #1930.
parent 207d694a
...@@ -516,9 +516,7 @@ ...@@ -516,9 +516,7 @@
#endif #endif
#ifndef CYTHON_FALLTHROUGH #ifndef CYTHON_FALLTHROUGH
#if defined(__clang__) && __has_attribute(fallthrough) #if !defined(_MSC_VER) && __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#elif defined(__GNUC__) && defined(__attribute__)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else #else
#define CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment