Commit 4de0b375 authored by Robert Bradshaw's avatar Robert Bradshaw

Suppress unused function warnings for Clang.

Cython uses many static inline utility functions.  Most compilers
don't emit warnings for such functions, but Clang does if they're
not defined in header files.  As such functions are often defined
as a group (e.g. utility code for a specific type) it would be
cumbersome to thin them out to those that happen to actually get
used.  Instead, simply suppress this warning for this compiler
for all inline functions.
parent d5a5efb1
......@@ -422,7 +422,9 @@
// inline attribute
#ifndef CYTHON_INLINE
#if defined(__GNUC__)
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#elif defined(__GNUC__)
#define CYTHON_INLINE __inline__
#elif defined(_MSC_VER)
#define CYTHON_INLINE __inline
......@@ -442,7 +444,11 @@
// inline attribute
#ifndef CYTHON_INLINE
#define CYTHON_INLINE inline
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#else
#define CYTHON_INLINE inline
#endif
#endif
// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor
......
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