From 76f11b0eda50f05fb0912738be41b4333a82f748 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Mon, 10 Dec 2018 16:21:07 +0200 Subject: Silence GCC 9 warnings Change-Id: I5654881a3adac6f67a38837321c8e1c3ce1e2d8f Reviewed-by: Thiago Macieira --- mkspecs/features/qt_common.prf | 17 ++++++++++++++++- mkspecs/features/qt_module_headers.prf | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 4ad9946ae0..e67b79acc3 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -89,6 +89,14 @@ clang { greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond # GCC 7 has a lot of false positives relating to this, so disable completely greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow + # GCC 9 has a lot of false positives relating to this, so disable completely + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime } warnings_are_errors:warning_clean { @@ -127,7 +135,14 @@ warnings_are_errors:warning_clean { # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs. greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough - + # GCC 9 has a lot of false positives relating to this, so disable completely + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix } diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 70d3520e5c..6b4b9143fa 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -239,6 +239,14 @@ headersclean:!internal_module { gcc_ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION} versionAtLeast(gcc_ver, 4.5): hcleanFLAGS += -Wdouble-promotion versionAtLeast(gcc_ver, 4.9): hcleanFLAGS += -Wfloat-conversion + # GCC 9 has a lot of false positives relating to this, so disable completely + greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-deprecated-copy + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-redundant-move + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-format-overflow + # GCC 9 introduced this + greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-init-list-lifetime c++11 { # only enabled for actual c++11 builds due to -- cgit v1.2.3