lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 28938ad: Use '-isystem' for wx, but not for {


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 28938ad: Use '-isystem' for wx, but not for {xml, xslt}wrapp sources
Date: Wed, 17 Jun 2020 17:21:23 -0400 (EDT)

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

    Use '-isystem' for wx, but not for {xml,xslt}wrapp sources
    
    Using '-isystem' instead of '-I' to find included files is a last
    resort, when no other technique works as well. For wx, writing pragmata
    in a header like 'pchfile_wx.hpp' has the unfortunate effect of masking
    real defects in lmi code that includes it. Nevertheless, added such
    pragmata, as comments, to 'pchfile_wx.hpp'; compiling with them enabled
    and with this line:
       $(wx_include_paths) \
    moved from 'sys_include_directories' to 'lmi_include_directories' in
    'workhorse.make' shows that the list of pragmata is complete. For wx,
    '-Wzero-as-null-pointer-constant' must be disabled by pragma because the
    '-isystem' technique does not suppress the diagnostics it elicits in lmi
    code that uses wx macros.
    
    OTOH, added such pragmata to 'xml_xslt_wrapp.cpp', and moved the line
    +  /opt/lmi/third_party/src
    from 'sys_include_directories' to 'lmi_include_directories' in
    'workhorse.make', so that '*.cxx' files are included by means of '-I'.
    This '.cpp' file is not a header, and is not included by any other file,
    so this change can mask no defect in any other code.
    
    All pragmata have been tested with gcc-8.3 and gcc-10.0, with no attempt
    to conditionalize them for any earlier version of gcc that might not
    recognize them.
---
 pchfile_wx.hpp     | 8 ++++++++
 workhorse.make     | 2 +-
 xml_xslt_wrapp.cpp | 8 ++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/pchfile_wx.hpp b/pchfile_wx.hpp
index 5051610..4c93e61 100644
--- a/pchfile_wx.hpp
+++ b/pchfile_wx.hpp
@@ -35,6 +35,14 @@
 // 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__
+//#   pragma GCC diagnostic ignored "-Wcast-qual"
+//#   pragma GCC diagnostic ignored "-Wdouble-promotion"
+//#   pragma GCC diagnostic ignored "-Wextra-semi"
+//#   pragma GCC diagnostic ignored "-Wformat-nonliteral"
+//#   pragma GCC diagnostic ignored "-Wnoexcept"
+//#   pragma GCC diagnostic ignored "-Wold-style-cast"
+//#   pragma GCC diagnostic ignored "-Wsuggest-override"
+//#   pragma GCC diagnostic ignored "-Wuseless-cast"
 #   pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
 #endif // defined __GNUC__ && !defined __clang__
 
diff --git a/workhorse.make b/workhorse.make
index e722dc4..1f7cec4 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -299,12 +299,12 @@ lmi_include_directories := \
   $(srcdir) \
   $(srcdir)/tools/pete-2.1.1 \
   $(overriding_include_directories) \
+  /opt/lmi/third_party/src \
 
 sys_include_directories := \
   $(compiler_include_directory) \
   $(wx_include_paths) \
   /opt/lmi/third_party/include \
-  /opt/lmi/third_party/src \
   $(localincludedir) \
   $(localincludedir)/libxml2 \
 
diff --git a/xml_xslt_wrapp.cpp b/xml_xslt_wrapp.cpp
index b8d361f..6f5a6c7 100644
--- a/xml_xslt_wrapp.cpp
+++ b/xml_xslt_wrapp.cpp
@@ -21,6 +21,14 @@
 
 #include "pchfile.hpp"
 
+#if defined __GNUC__ && !defined __clang__
+#   pragma GCC diagnostic ignored "-Wextra-semi"
+#   pragma GCC diagnostic ignored "-Wnull-dereference"
+#   pragma GCC diagnostic ignored "-Wsuggest-override"
+#   pragma GCC diagnostic ignored "-Wswitch-enum"
+#   pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+#endif // defined __GNUC__ && !defined __clang__
+
 #define HAVE_BOOST_POOL_SINGLETON_POOL_HPP
 
 #include "libxml/ait_impl.cxx"



reply via email to

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