From 256f810be3af225bac1ed464a13bcd314a00f303 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Jun 2014 11:28:11 -0700 Subject: [PATCH] Fix annoying warning from ICC 14 on Windows It says that defining a macro that does defined() is not portable. The solution implemented for MSVC 2008 and earlier does work, however, and is portable to all compilers (the parentheses around the macro are unnecessary). Incidentally, this makes d98004cd2f33e8147cff9f3cb203fdef5e6dd00e actually work: Q_CC_MSVC wasn't defined at that point in the file, so that change had never taken effect. warning #3199: "defined" is always false in a macro expansion in Microsoft mode Task-number: QTBUG-39597 Change-Id: Iaa2895e7f63d97c439090043435a2b8d2f185c3a Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qglobal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index f610cfab8c..255eb6c00b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Copyright (C) 2012 Intel Corporation. +** Copyright (C) 2014 Intel Corporation. ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -59,7 +59,7 @@ #include #include #endif -#if defined(Q_CC_MSVC) && _MSC_VER <= 1500 /* VS2008 */ +#ifdef _MSC_VER # define QT_SUPPORTS(FEATURE) (!defined QT_NO_##FEATURE) #else # define QT_SUPPORTS(FEATURE) (!defined(QT_NO_##FEATURE))