diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2019-04-23 06:00:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-23 06:00:49 +0300 |
commit | 4068e79a3214ac84a27f1e8c0d56a3e53a156fc6 (patch) | |
tree | 475ddd426392a49eeefa4ee6485266afe7a206b2 | |
parent | 05ef1f49984f60c477ab88ae7811d644a6578815 (diff) | |
parent | 4134f9e1613e6fea08b5aedd070e4264965df711 (diff) |
Merge pull request #27868 from marxin/add-more-warnings
Add more warnings on top of -Wall and -Wextra.
-rw-r--r-- | SConstruct | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 78d77d1b7a..8e6795cbcb 100644 --- a/SConstruct +++ b/SConstruct @@ -347,11 +347,18 @@ if selected_platform in platform_list: if (env["warnings"] == 'extra'): # FIXME: enable -Wclobbered once #26351 is fixed + # FIXME: enable -Wlogical-op and -Wduplicated-branches once #27594 is merged # Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC) # once we switch to C++11 or later (necessary for our FALLTHROUGH macro). - env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning) + env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter', + '-Wctor-dtor-privacy', '-Wnon-virtual-dtor'] + + all_plus_warnings + shadow_local_warning) if methods.using_gcc(env): - env['CCFLAGS'] += ['-Wno-clobbered'] + env['CCFLAGS'] += ['-Wno-clobbered', '-Walloc-zero', '-Wnoexcept', + '-Wduplicated-cond', '-Wplacement-new=1', '-Wstringop-overflow=4'] + version = methods.get_compiler_version(env) + if version != None and version[0] >= '9': + env['CCFLAGS'] += ['-Wattribute-alias=2'] elif (env["warnings"] == 'all'): env.Append(CCFLAGS=['-Wall'] + shadow_local_warning) elif (env["warnings"] == 'moderate'): |