lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 1192bc5 4/6: Don't interleave diagnostic push


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 1192bc5 4/6: Don't interleave diagnostic push/pop pragmas for clang
Date: Fri, 16 Apr 2021 18:12:49 -0400 (EDT)

branch: master
commit 1192bc58a3c7ccd669b9510d73050b7e16dbe0e2
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Don't interleave diagnostic push/pop pragmas for clang
    
    Keep pairs of diagnostic push/pop pragmas nested, rather than
    interleaving them: even if this doesn't seem to cause any problems
    currently, it still seems preferable to avoid popping clang and GCC
    diagnostic stacks in different order from pushing them.
    
    No real changes.
---
 bourn_cast_test.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bourn_cast_test.cpp b/bourn_cast_test.cpp
index 32c8e60..30b8b31 100644
--- a/bourn_cast_test.cpp
+++ b/bourn_cast_test.cpp
@@ -468,12 +468,12 @@ void test_m64_neighborhood()
 #   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__
+#if defined __clang__
+#   pragma clang diagnostic pop
+#endif // defined __clang__
     LMI_TEST(f_ull_max == static_cast<float>(ull_max));
     // Suppressed because behavior is undefined:
     // LMI_TEST(ull_max == static_cast<unsigned long long int>(f_ull_max));



reply via email to

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