lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 87aad3c 1/6: Fix bourn_cast test compilation


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 87aad3c 1/6: Fix bourn_cast test compilation with clang
Date: Fri, 3 Apr 2020 18:51:38 -0400 (EDT)

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

    Fix bourn_cast test compilation with clang
    
    Suppress clang-specific warning given for a particular test code snippet
    in a similar way already used for gcc.
---
 bourn_cast_test.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bourn_cast_test.cpp b/bourn_cast_test.cpp
index 5381e1c..17caf9e 100644
--- a/bourn_cast_test.cpp
+++ b/bourn_cast_test.cpp
@@ -463,11 +463,18 @@ void test_m64_neighborhood()
     // unsigned integer is UB.
 
     unsigned long long int const ull_max = ull_traits::max();
+#if defined __clang__
+#   pragma clang diagnostic push
+#   pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
+#endif // defined __clang__
 #if defined __GNUC__
 #   pragma GCC diagnostic push
 #   pragma GCC diagnostic ignored "-Wfloat-conversion"
 #endif // defined __GNUC__
     float const f_ull_max = ull_max;
+#if defined __clang__
+#   pragma clang diagnostic pop
+#endif // defined __clang__
 #if defined __GNUC__
 #   pragma GCC diagnostic pop
 #endif // defined __GNUC__



reply via email to

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