>From f4db403ed8a68cedf88676bd05ae75526f1cd5fc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Mar 2017 16:26:58 +0100 Subject: [PATCH] Also disable gcc -Wbool-compare warning in bourn_cast This warning is given when instantiating this template with "bool" as the target type by gcc 5 or later and needs to be suppressed to allow bourn_cast_test.cpp to compile. --- bourn_cast.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bourn_cast.hpp b/bourn_cast.hpp index 3703b1f..7c65362 100644 --- a/bourn_cast.hpp +++ b/bourn_cast.hpp @@ -83,6 +83,7 @@ inline To bourn_cast(From from) #if defined __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wsign-compare" +# pragma GCC diagnostic ignored "-Wbool-compare" #endif // defined __GNUC__ if(! to_traits::is_signed && from < 0) throw std::runtime_error("Cast would convert negative to unsigned."); -- 2.8.0.rc1