diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-09-12 15:20:06 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 01:01:08 +0200 |
commit | f0fb53dec36d0d46d70f6fe4286c2a2057fc1dad (patch) | |
tree | 5fd431ac0ecd89a10a53433b5310b37d62ee4923 /src/corelib/global/qcompilerdetection.h | |
parent | af7a0ee55fd511652e3fe59fd62865aaf2a536a2 (diff) |
throw() is C++, so don't use it in C mode
Q_DECL_NOTHROW is used by qVersion(), which can be extern "C".
Change-Id: If71f3bc3a0df3e8321237e5ac9f3bea82380c1e4
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 42c7d04128..919f8f82c1 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -108,7 +108,9 @@ /* only defined for MSVC since that's the only compiler that actually optimizes for this */ /* might get overridden further down when Q_COMPILER_NOEXCEPT is detected */ -# define Q_DECL_NOTHROW throw() +# ifdef __cplusplus +# define Q_DECL_NOTHROW throw() +# endif #elif defined(__BORLANDC__) || defined(__TURBOC__) # define Q_CC_BOR |