build: disable -Wmissing-braces with clang < 6.0
Also remove some -Wno-error= flags that are no longer needed.
Change-Id: I0e0ad52c69fd42b815f5b20f45311d0c9b8cdef3
Refs: #4721
diff --git a/.travis.yml b/.travis.yml
index ef557b6..1c238d3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,8 @@
env: COMPILER=clang++-6.0
- os: linux
env: COMPILER=clang++-7
+ - os: linux
+ env: COMPILER=clang++-8
# macOS/clang
# https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
@@ -58,10 +60,14 @@
- os: osx
osx_image: xcode9.4
env: OSX_VERSION=10.13 USE_OPENSSL_1_1=yes
+ - os: osx
+ osx_image: xcode10
+ env: OSX_VERSION=10.13
allow_failures:
- env: COMPILER=clang++-3.6
- env: COMPILER=clang++-3.7 DISABLE_ASAN=yes
+ - env: COMPILER=clang++-8
- env: OSX_VERSION=10.13 USE_OPENSSL_1_1=yes
fast_finish: true
@@ -76,8 +82,8 @@
clang++-*)
CLANG_VERSION=${COMPILER/clang++}
if [[ ${CLANG_VERSION} != "-3."* ]]; then
- wget -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
- travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${CLANG_VERSION/-7} main"
+ travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
+ travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${CLANG_VERSION/-8} main"
fi
travis_retry sudo apt-get -qq update
travis_retry sudo apt-get -qy install "clang${CLANG_VERSION}"
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 2be9d90..6b53d3c 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -186,15 +186,13 @@
flags['CXXFLAGS'] += ['-fcolor-diagnostics',
'-Wextra-semi',
'-Wundefined-func-template',
- '-Wno-error=deprecated-register',
- '-Wno-error=infinite-recursion', # Bug #3358
- '-Wno-error=keyword-macro', # Bug #3235
- '-Wno-error=unneeded-internal-declaration', # Bug #1588
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
]
version = self.getCompilerVersion(conf)
if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
+ if version < (6, 0, 0):
+ flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
return flags
def getOptimizedFlags(self, conf):
@@ -207,4 +205,6 @@
version = self.getCompilerVersion(conf)
if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
+ if version < (6, 0, 0):
+ flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
return flags