lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master ed512d2 2/2: Work around '-Wcast-function-typ


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ed512d2 2/2: Work around '-Wcast-function-type' diagnostics more selectively
Date: Wed, 20 Mar 2019 19:30:18 -0400 (EDT)

branch: master
commit ed512d2dd644ef4068f1a63d63bfc8744c18fdab
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Work around '-Wcast-function-type' diagnostics more selectively
---
 pchfile_wx.hpp | 3 +++
 workhorse.make | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/pchfile_wx.hpp b/pchfile_wx.hpp
index 5078468..c28aa36 100644
--- a/pchfile_wx.hpp
+++ b/pchfile_wx.hpp
@@ -35,6 +35,9 @@
 // disable some warnings which are enabled for the rest of lmi code but have to
 // be disabled for the code using wxWidgets as they occur in wxWidgets headers.
 #if defined __GNUC__ && !defined __clang__
+#   if 8 <= __GNUC__
+#       pragma GCC diagnostic ignored "-Wcast-function-type"
+#   endif // 8 <= __GNUC__
 #   pragma GCC diagnostic ignored "-Wcast-qual"
 //  only 'strvararg.h:1048:19':
 #   pragma GCC diagnostic ignored "-Wdouble-promotion"
diff --git a/workhorse.make b/workhorse.make
index a619c9b..aac4984 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -412,7 +412,6 @@ else ifneq (,$(filter $(gcc_version), 7.2.0 7.3.0))
   cxx_standard := -frounding-math -std=c++17
 else ifneq (,$(filter $(gcc_version), 8.1.0 8.2.0))
   gcc_version_specific_warnings := \
-    -Wno-cast-function-type \
 
   cxx_standard := -frounding-math -std=c++17
 endif
@@ -548,6 +547,7 @@ gcc_common_extra_warnings := \
 wx_dependent_objects :=
 
 $(wx_dependent_objects): gcc_common_extra_warnings += \
+  -Wno-cast-function-type \
   -Wno-cast-qual \
   -Wno-double-promotion \
   -Wno-format-nonliteral \



reply via email to

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