bug 1868: restrict the compiler version for Wstrict-overflow=5 until gcc-4.9 issues are addressed
authorTom Henderson <tomh@tomh.org>
Fri, 06 Jun 2014 10:11:35 -0700
changeset 10800 85f484cffccd
parent 10799 6ba6e4674c29
child 10801 02d564a4c823
bug 1868: restrict the compiler version for Wstrict-overflow=5 until gcc-4.9 issues are addressed
wscript
--- a/wscript	Fri Jun 06 10:10:51 2014 -0700
+++ b/wscript	Fri Jun 06 10:11:35 2014 -0700
@@ -31,7 +31,7 @@
 
 # Bug 1868:  be conservative about -Wstrict-overflow for optimized builds
 # on older compilers; it can generate spurious warnings.  
-min_cc_version_warn_strict_overflow = ('4', '8', '2')
+cc_version_warn_strict_overflow = ('4', '8', '2')
 
 # Get the information out of the NS-3 configuration file.
 config_file_exists = False
@@ -330,7 +330,7 @@
             if conf.check_compilation_flag('-march=native'):
                 env.append_value('CXXFLAGS', '-march=native') 
             env.append_value('CXXFLAGS', '-fstrict-overflow')
-            if conf.env['CC_VERSION'] >= min_cc_version_warn_strict_overflow:
+            if conf.env['CC_VERSION'] == cc_version_warn_strict_overflow:
                 env.append_value('CXXFLAGS', '-Wstrict-overflow=5')
 
         if sys.platform == 'win32':