From 0941b018fd912ced0d557b110ecc7a15de533ff3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 21 Feb 2017 07:10:35 +0200 Subject: [PATCH] Use GCC's warning key -Wzero-as-null-pointer-constant. This flag will be useful for checking using new C++11 keyword nullptr. But because this flag produce a lot "false alarm" from insides of Qt we can't suppress better to wait time when Qt team will fully use Q_NULLPTR macros. --HG-- branch : develop --- common.pri | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.pri b/common.pri index eb6318df4..f9933837c 100644 --- a/common.pri +++ b/common.pri @@ -259,6 +259,11 @@ GCC_DEBUG_CXXFLAGS += \ -Wno-unused \ -ftrapv +# Good support Q_NULLPTR come later +greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4) { +GCC_DEBUG_CXXFLAGS += -Wzero-as-null-pointer-constant +} + # Since GCC 5 g++5:GCC_DEBUG_CXXFLAGS += \ -Wswitch-bool \