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
This commit is contained in:
Roman Telezhynskyi 2017-02-21 07:10:35 +02:00
parent f50f9f860f
commit 0941b018fd

View File

@ -259,6 +259,11 @@ GCC_DEBUG_CXXFLAGS += \
-Wno-unused \ -Wno-unused \
-ftrapv -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 # Since GCC 5
g++5:GCC_DEBUG_CXXFLAGS += \ g++5:GCC_DEBUG_CXXFLAGS += \
-Wswitch-bool \ -Wswitch-bool \