From 5524a2fd4657a4ea5e35a3f1a2151c7c0b90256e Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Thu, 28 Mar 2019 05:14:34 +0300 Subject: [PATCH] Limit C5033 warning suppression to VC14.0+ Fixes `#pragma warning : warning number '5033' not a valid compiler warning` --- include/boost/python/detail/wrap_python.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/python/detail/wrap_python.hpp b/include/boost/python/detail/wrap_python.hpp index 13679dbb8f..36a7fda6d4 100644 --- a/include/boost/python/detail/wrap_python.hpp +++ b/include/boost/python/detail/wrap_python.hpp @@ -167,7 +167,7 @@ typedef int pid_t; #if BOOST_PYTHON_GCC_HAS_WREGISTER # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wregister" -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && _MSC_VER >= 1900 # pragma warning(push) # pragma warning(disable : 5033) // 'register' is no longer a supported storage class #endif @@ -180,7 +180,7 @@ typedef int pid_t; #if BOOST_PYTHON_GCC_HAS_WREGISTER # pragma GCC diagnostic pop -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && _MSC_VER >= 1900 # pragma warning(pop) #endif #undef BOOST_PYTHON_GCC_HAS_WREGISTER