Skip to content

Commit c27e691

Browse files
committed
Make warning suppressions MINGW-specific again.
Background: pybind#4285 (comment)
1 parent 08a4a47 commit c27e691

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/pybind11/eigen/matrix.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
PYBIND11_WARNING_PUSH
2020
PYBIND11_WARNING_DISABLE_MSVC(5054) // https://github.com/pybind/pybind11/pull/3741
2121
// C5054: operator '&': deprecated between enumerations of different types
22+
#if defined(__MINGW32__)
2223
PYBIND11_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
24+
#endif
2325

2426
#include <Eigen/Core>
2527
#include <Eigen/SparseCore>

include/pybind11/eigen/tensor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ static_assert(__GNUC__ > 5, "Eigen Tensor support in pybind11 requires GCC > 5.0
1717
PYBIND11_WARNING_PUSH
1818
PYBIND11_WARNING_DISABLE_MSVC(4554)
1919
PYBIND11_WARNING_DISABLE_MSVC(4127)
20+
#if defined(__MINGW32__)
2021
PYBIND11_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
22+
#endif
2123

2224
#include <unsupported/Eigen/CXX11/Tensor>
2325

0 commit comments

Comments
 (0)