Commit 79fbf118 authored by Robert Bradshaw's avatar Robert Bradshaw

Isolate C++ fallthrough detection.

parent 3694bb81
...@@ -444,14 +444,20 @@ ...@@ -444,14 +444,20 @@
#ifndef CYTHON_FALLTHROUGH #ifndef CYTHON_FALLTHROUGH
#if __has_cpp_attribute(fallthrough) #ifdef __cplusplus
#define CYTHON_FALLTHROUGH [[fallthrough]] #if __has_cpp_attribute(fallthrough)
#elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]]
#define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(clang::fallthrough)
#elif __has_attribute(fallthrough) || (defined(__GNUC__) && defined(__attribute__)) #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #endif
#else #endif
#define CYTHON_FALLTHROUGH
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough) || (defined(__GNUC__) && defined(__attribute__))
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif #endif
#endif #endif
......
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