summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-01-11 05:52:20 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2016-01-11 05:52:20 -0500
commit12eb0343784f52994110df7e7fce4a0b639a6ec3 (patch)
tree12ff1c51b8051bb7e7d889eed499bee0dcd4cd1e /src/SConscript
parent7661f1c2bf2b45603264076fabce2eb42373cd18 (diff)
downloadgem5-12eb0343784f52994110df7e7fce4a0b639a6ec3.tar.xz
scons: Enable -Wextra by default
Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial.
Diffstat (limited to 'src/SConscript')
-rwxr-xr-xsrc/SConscript18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/SConscript b/src/SConscript
index eae03a98a..322212cb7 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1018,11 +1018,6 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
# the SWIG generated code
swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
- # Add additional warnings here that should not be applied to
- # the SWIG generated code
- new_env.Append(CXXFLAGS=['-Wmissing-declarations',
- '-Wdelete-non-virtual-dtor'])
-
if env['GCC']:
# Depending on the SWIG version, we also need to supress
# warnings about uninitialized variables and missing field
@@ -1030,7 +1025,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
swig_env.Append(CCFLAGS=['-Wno-uninitialized',
'-Wno-missing-field-initializers',
'-Wno-unused-but-set-variable',
- '-Wno-maybe-uninitialized'])
+ '-Wno-maybe-uninitialized',
+ '-Wno-type-limits'])
# Only gcc >= 4.9 supports UBSan, so check both the version
# and the command-line option before adding the compiler and
@@ -1041,13 +1037,9 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
new_env.Append(LINKFLAGS='-fsanitize=undefined')
if env['CLANG']:
- swig_env.Append(CCFLAGS=[
- # Some versions of SWIG can return uninitialized values
- '-Wno-sometimes-uninitialized',
- # Register storage is requested in a lot of places in
- # SWIG-generated code.
- '-Wno-deprecated-register',
- ])
+ swig_env.Append(CCFLAGS=['-Wno-sometimes-uninitialized',
+ '-Wno-deprecated-register',
+ '-Wno-tautological-compare'])
# All supported clang versions have support for UBSan, so if
# asked to use it, append the compiler and linker flags.