lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 6b3860f 2/5: Disable MSVC warnings in bourn_c


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 6b3860f 2/5: Disable MSVC warnings in bourn_cast.hpp
Date: Thu, 27 Apr 2017 11:54:07 -0400 (EDT)

branch: master
commit 6b3860faf0dc9b70ee649e31ee4f69ca384340be
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Disable MSVC warnings in bourn_cast.hpp
    
    Use compiler-specific pragmas to avoid unavoidable (or, at least,
    difficult to avoid), but known to be harmless here, warnings about
    signed/unsigned and boolean comparisons with MSVC, just as we already
    do it for gcc/clang.
---
 bourn_cast.hpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bourn_cast.hpp b/bourn_cast.hpp
index 2121286..d3162ac 100644
--- a/bourn_cast.hpp
+++ b/bourn_cast.hpp
@@ -38,7 +38,11 @@
 #   if 5 <= __GNUC__
 #       pragma GCC diagnostic ignored "-Wbool-compare"
 #   endif // 5 <= __GNUC__
-#endif // defined __GNUC__
+#elif defined LMI_MSC
+#   pragma warning(push)
+#   pragma warning(disable : 4018)
+#   pragma warning(disable : 4804)
+#endif // defined LMI_MSC
 
 /// Floating to floating.
 ///
@@ -237,7 +241,9 @@ inline To bourn_cast(From from, std::true_type, 
std::true_type)
 
 #if defined __GNUC__
 #   pragma GCC diagnostic pop
-#endif // defined __GNUC__
+#elif defined LMI_MSC
+#   pragma warning(pop)
+#endif // defined LMI_MSC
 
 /// Numeric stinted cast, across whose bourn no value is returned.
 ///



reply via email to

[Prev in Thread] Current Thread [Next in Thread]