summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-06-19 16:22:49 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-06-25 16:51:59 +0200
commit53262b9b5b9cb536916f6d6e086a944cb17bb8d8 (patch)
tree80bd0f0800e679c4b9f22a3dc0a6133eec3d1eb3
parenta1fc11ca655850a47701f3715f1408c336ddb6c7 (diff)
Only define the MSVC C++11 feature macros in C++
Don't define them if qcompilerdetection.h was compiled in C mode. Change-Id: I080b62ef7c68bb582e55e9e3a1dff4e6c1bb48bd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/corelib/global/qcompilerdetection.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index f9f86fd74c..afbbaf8f2d 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -785,6 +785,7 @@
#endif
#if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL)
+# if defined(__cplusplus)
# if _MSC_VER >= 1400
/* C++11 features supported in VC8 = VC2005: */
# define Q_COMPILER_VARIADIC_MACROS
@@ -843,6 +844,7 @@
# define Q_COMPILER_INITIALIZER_LISTS
# endif /* VC 12 SP 2 RC */
+# endif /* __cplusplus */
#endif /* Q_CC_MSVC */
#ifdef __cplusplus