lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master a09d2fc 2/6: Remove needless gcc-version cond


From: Greg Chicares
Subject: [lmi-commits] [lmi] master a09d2fc 2/6: Remove needless gcc-version conditionals
Date: Tue, 16 Jun 2020 15:43:48 -0400 (EDT)

branch: master
commit a09d2fcc26e71a48b2eeac4a4ebd6e0ca3614957
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Remove needless gcc-version conditionals
    
    The '-Wuseless-cast' warning was added in gcc-4.8, and should not have
    been suppressed only for gcc-7 and later.
    
    Incidentally, if lmi soon upgrades to gcc-10 as hoped, and withdraws
    support for earlier versions (e.g., because gcc-10 has a workable
    <filesystem>), then historical conditionals like this should be removed
    globally.
---
 boost_regex.hpp | 2 +-
 md5.cpp         | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/boost_regex.hpp b/boost_regex.hpp
index e313c01..863f498 100644
--- a/boost_regex.hpp
+++ b/boost_regex.hpp
@@ -33,13 +33,13 @@
 #   if 7 <= __GNUC__
 #       pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
 #       pragma GCC diagnostic ignored "-Wregister"
-#       pragma GCC diagnostic ignored "-Wuseless-cast"
 #   endif // 7 <= __GNUC__
 #   if 10 <= __GNUC__
 #       pragma GCC diagnostic ignored "-Wdeprecated-copy"
 #   endif // 10 <= __GNUC__
 #   pragma GCC diagnostic ignored "-Wshadow"
 #   pragma GCC diagnostic ignored "-Wswitch-enum"
+#   pragma GCC diagnostic ignored "-Wuseless-cast"
 #endif // defined __GNUC__
 #include <boost/regex.hpp>
 #if defined __clang__
diff --git a/md5.cpp b/md5.cpp
index 8431796..b038cfd 100644
--- a/md5.cpp
+++ b/md5.cpp
@@ -89,9 +89,7 @@
 #endif // !defined WORDS_BIGENDIAN
 
 #if defined __GNUC__ && !defined __clang__
-#   if 7 <= __GNUC__
-#       pragma GCC diagnostic ignored "-Wuseless-cast"
-#   endif // 7 <= __GNUC__
+#   pragma GCC diagnostic ignored "-Wuseless-cast"
 #endif // defined __GNUC__ && !defined __clang__
 
 /* This array contains the bytes used to pad the buffer to the next



reply via email to

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