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

Isolate C++ fallthrough detection.

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