Skip to content

Commit fd5e60f

Browse files
Keerthi Timmarajumborland
Keerthi Timmaraju
authored andcommitted
gcc 4.6: return value even when return is unreachable
1 parent b663353 commit fd5e60f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/boost/test/detail/config.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ class type_info;
151151
#endif /* ifndef BOOST_PP_VARIADICS */
152152

153153
// some versions of VC exibit a manifest error with this BOOST_UNREACHABLE_RETURN
154-
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
154+
// gcc <= 4.6 fails with unused variable even when the return is never reached
155+
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) || (defined(BOOST_GCC) && BOOST_GCC < 40700)
155156
# define BOOST_TEST_UNREACHABLE_RETURN(x) return x
156157
#else
157158
# define BOOST_TEST_UNREACHABLE_RETURN(x) BOOST_UNREACHABLE_RETURN(x)

0 commit comments

Comments
 (0)