aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/Python.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 64be8014589..f34d581f0b4 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -59,6 +59,14 @@
# include <intrin.h> // __readgsqword()
#endif
+// Suppress known warnings in Python header files.
+#if defined(_MSC_VER)
+// Warning that alignas behaviour has changed. Doesn't affect us, because we
+// never relied on the old behaviour.
+#pragma warning(push)
+#pragma warning(disable: 5274)
+#endif
+
// Include Python header files
#include "pyport.h"
#include "pymacro.h"
@@ -138,4 +146,9 @@
#include "cpython/pyfpe.h"
#include "cpython/tracemalloc.h"
+// Restore warning filter
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif /* !Py_PYTHON_H */