Don't use -Wsuggest-override on gcc 7.5.0 (Ubuntu 18.04)
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Feb 2024 21:57:01 +0000 (22:57 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Feb 2024 21:57:01 +0000 (22:57 +0100)
because turning it off with a pragma seems not to work.

wscript

diff --git a/wscript b/wscript
index 2ca54488e32df843e184c57d82939c66f8e155b3..8b96afd29364da2eef3ad223ae3c410bec2843ce 100644 (file)
--- a/wscript
+++ b/wscript
@@ -147,8 +147,10 @@ def configure(conf):
             conf.env.append_value('CXXFLAGS', ['-Wno-cast-function-type'])
         # Most gccs still give these warnings from boost::optional
         conf.env.append_value('CXXFLAGS', ['-Wno-maybe-uninitialized'])
-        if int(gcc[0]) > 4:
+        if int(gcc[0]) > 7:
             # gcc 4.8.5 on Centos 7 does not have this warning
+            # gcc 7.5.0 on Ubuntu 18.04 does, but I didn't manage to turn it
+            # back off again with a pragma
             conf.env.append_value('CXXFLAGS', ['-Wsuggest-override'])
 
     if conf.options.enable_debug: