[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 5ea1ff2 1/2: Also disable gcc -Wbool-compare
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 5ea1ff2 1/2: Also disable gcc -Wbool-compare warning in bourn_cast |
Date: |
Tue, 21 Mar 2017 03:23:07 -0400 (EDT) |
branch: master
commit 5ea1ff21213e42fd619291d37ae8ff267a26d854
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
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.");