From f5022b5ca8b820205cf3bbb800ebb02b3a115378 Mon Sep 17 00:00:00 2001 From: Peter Kolbus Date: Mon, 26 Mar 2018 22:38:33 -0500 Subject: [PATCH 1/2] Fix MSVC C4668 in throw_exception.hpp Fix MSVC C4668 warnings (undefined preprocessor macro) for __GNUC__ and __GNUC_MINOR__ by checking if __GNUC__ is defined first. --- include/boost/throw_exception.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index d45306c..c7d7637 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -3,7 +3,7 @@ #include -#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) From f796dd892a5835aa577f91367f7879c3afe9ec2b Mon Sep 17 00:00:00 2001 From: Peter Kolbus Date: Mon, 26 Mar 2018 22:39:26 -0500 Subject: [PATCH 2/2] Fix MSVC C4668 in exception.hpp Fix MSVC C4668 warnings (undefined preprocessor macro) for __GNUC__ and __GNUC_MINOR__ by checking if __GNUC__ is defined first. --- include/boost/exception/exception.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index c0fdaf9..d24845f 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -5,7 +5,7 @@ #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 -#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)