>From 7cc885fd6e47a60ba7657b170604a200e74df973 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bourn_cast.hpp b/bourn_cast.hpp index 3703b1f..f8b6d05 100644 --- a/bourn_cast.hpp +++ b/bourn_cast.hpp @@ -83,6 +83,9 @@ inline To bourn_cast(From from) #if defined __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wsign-compare" +# if __GNUC__ >= 5 +# pragma GCC diagnostic ignored "-Wbool-compare" +# endif // __GNUC__ >= 5 #endif // defined __GNUC__ if(! to_traits::is_signed && from < 0) throw std::runtime_error("Cast would convert negative to unsigned."); -- 2.8.0.rc1