From fd5e60f995604ca64d5194c1e5bd477d194683db Mon Sep 17 00:00:00 2001 From: Keerthi Timmaraju Date: Tue, 15 Aug 2023 13:42:00 +0200 Subject: [PATCH] gcc 4.6: return value even when return is unreachable --- include/boost/test/detail/config.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/test/detail/config.hpp b/include/boost/test/detail/config.hpp index 698b5d9961..3072bf7754 100644 --- a/include/boost/test/detail/config.hpp +++ b/include/boost/test/detail/config.hpp @@ -151,7 +151,8 @@ class type_info; #endif /* ifndef BOOST_PP_VARIADICS */ // some versions of VC exibit a manifest error with this BOOST_UNREACHABLE_RETURN -#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) +// gcc <= 4.6 fails with unused variable even when the return is never reached +#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) || (defined(BOOST_GCC) && BOOST_GCC < 40700) # define BOOST_TEST_UNREACHABLE_RETURN(x) return x #else # define BOOST_TEST_UNREACHABLE_RETURN(x) BOOST_UNREACHABLE_RETURN(x)