Skip to content

Commit 90387c3

Browse files
authored
Merge pull request #420 from boostorg/develop
Merge for 1.86
2 parents 822dc24 + fd5e60f commit 90387c3

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

build/Jamfile.v2

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import os ;
88

9-
import ../../predef/check/predef
9+
import ../../predef/tools/check/predef
1010
: check
1111
: predef-check ;
1212

include/boost/test/detail/config.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class type_info;
136136
#define BOOST_PP_VARIADICS 1
137137
#endif
138138

139-
#if BOOST_CLANG
139+
#ifdef BOOST_CLANG
140140
#define BOOST_PP_VARIADICS 1
141141
#endif
142142

@@ -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)

include/boost/test/utils/named_params.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ struct nil {
131131
#else
132132
operator T const&() const
133133
#endif
134-
{ nfp_detail::report_access_to_invalid_parameter(true); static T* v = 0; return *v; }
134+
{ nfp_detail::report_access_to_invalid_parameter(true); static T* v = 0; BOOST_TEST_UNREACHABLE_RETURN(*v); }
135135

136136
template<typename T>
137137
T any_cast() const
138-
{ nfp_detail::report_access_to_invalid_parameter(true); static typename remove_reference<T>::type* v = 0; return *v; }
138+
{ nfp_detail::report_access_to_invalid_parameter(true); static typename remove_reference<T>::type* v = 0; BOOST_TEST_UNREACHABLE_RETURN(*v); }
139139

140140
template<typename Arg1>
141141
nil operator()( Arg1 const& )

test/Jamfile.v2

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ project boost/test-tests
1818
: requirements
1919
;
2020

21-
import ../../predef/check/predef
21+
import ../../predef/tools/check/predef
2222
: check require
2323
: predef-check predef-require ;
2424

0 commit comments

Comments
 (0)