From 729541f7ca1129731a2ec79492d15e7ecb3cad80 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 11:40:30 -0800 Subject: Store the GCC version number in Q_CC_GNU The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 8bc489e509..f17ff3dea0 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -877,7 +877,7 @@ public: // (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#382). // GCC 4.3 and 4.4 have support for decltype, but are affected by DR 382. # if defined(Q_COMPILER_DECLTYPE) && \ - (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || (__GNUC__ * 100 + __GNUC_MINOR__) >= 405) + (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || Q_CC_GNU >= 405) # define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference::type # else # define QT_FOREACH_DECLTYPE(x) __typeof__((x)) -- cgit v1.2.3