Skip to content

Commit

Permalink
gcc 4.6: return value even when return is unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
Keerthi Timmaraju authored and mborland committed May 31, 2024
1 parent b663353 commit fd5e60f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/boost/test/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fd5e60f

Please sign in to comment.