From 10e161cc569dc202ef1cea17615097d3310cc886 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 25 Jun 2023 15:48:38 +0300 Subject: [PATCH] Add -Wconversion et al to test/Jamfile --- include/boost/throw_exception.hpp | 4 ++-- test/Jamfile.v2 | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index cdda86b..7c7fcbd 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -104,9 +104,9 @@ public: copy_from( &e ); set_info( *this, throw_file( loc.file_name() ) ); - set_info( *this, throw_line( loc.line() ) ); + set_info( *this, throw_line( static_cast( loc.line() ) ) ); set_info( *this, throw_function( loc.function_name() ) ); - set_info( *this, throw_column( loc.column() ) ); + set_info( *this, throw_column( static_cast( loc.column() ) ) ); } virtual boost::exception_detail::clone_base const * clone() const BOOST_OVERRIDE diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 40cfe1d..3061b83 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,12 +8,21 @@ import testing ; -project : requirements - extra - msvc:on - clang:on - gcc:on - gcc:-Wshadow ; +local gcc-flags = -Wsign-promo -Wconversion -Wsign-conversion -Wshadow ; + +project + : requirements + + extra + + msvc:on + clang:on + gcc:on + + gcc:$(gcc-flags) + clang:$(gcc-flags) + ; + run throw_exception_test.cpp ; run throw_exception_no_exceptions_test.cpp ;