|
56 | 56 | # elif __INTEL_COMPILER < 1900 && defined(PYBIND11_CPP14)
|
57 | 57 | # error pybind11 supports only C++11 with Intel C++ compiler v18. Use v19 or newer for C++14.
|
58 | 58 | # endif
|
| 59 | +/* The following pragma cannot be pop'ed: |
| 60 | + https://community.intel.com/t5/Intel-C-Compiler/Inline-and-no-inline-warning/td-p/1216764 */ |
| 61 | +# pragma warning disable 2196 // warning #2196: routine is both "inline" and "noinline" |
59 | 62 | #elif defined(__clang__) && !defined(__apple_build_version__)
|
60 | 63 | # if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3)
|
61 | 64 | # error pybind11 requires clang 3.3 or newer
|
|
107 | 110 | # define PYBIND11_NOINLINE __attribute__ ((noinline)) inline
|
108 | 111 | #endif
|
109 | 112 |
|
110 |
| -#if !defined(PYBIND11_NOINLINE_DISABLED) |
111 |
| -# if (defined(__CUDACC__) || (defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8))) \ |
112 |
| - && !defined(PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED) |
113 |
| -// Only CUDA version known/tested (as of August 2021): CUDA 11, Ubuntu 20.04 |
114 |
| -# define PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED |
115 |
| -# elif defined(__INTEL_COMPILER) |
116 |
| -// The following pragma cannot be pop'ed: |
117 |
| -// https://community.intel.com/t5/Intel-C-Compiler/Inline-and-no-inline-warning/td-p/1216764 |
118 |
| -# pragma warning disable 2196 // warning #2196: routine is both "inline" and "noinline" |
119 |
| -# endif |
120 |
| -#endif |
121 |
| - |
122 | 113 | #if defined(__MINGW32__)
|
123 | 114 | // For unknown reasons all PYBIND11_DEPRECATED member trigger a warning when declared
|
124 | 115 | // whether it is used or not
|
@@ -388,11 +379,6 @@ extern "C" {
|
388 | 379 | } \
|
389 | 380 | void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ & (variable))
|
390 | 381 |
|
391 |
| -#if defined(PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED) |
392 |
| -# pragma GCC diagnostic push |
393 |
| -# pragma GCC diagnostic ignored "-Wattributes" |
394 |
| -#endif |
395 |
| - |
396 | 382 | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
397 | 383 |
|
398 | 384 | using ssize_t = Py_ssize_t;
|
@@ -979,7 +965,3 @@ constexpr inline bool silence_msvc_c4127(bool cond) { return cond; }
|
979 | 965 |
|
980 | 966 | PYBIND11_NAMESPACE_END(detail)
|
981 | 967 | PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
|
982 |
| - |
983 |
| -#if defined(PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED) |
984 |
| -# pragma GCC diagnostic pop |
985 |
| -#endif |
0 commit comments