From f0fb53dec36d0d46d70f6fe4286c2a2057fc1dad Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 12 Sep 2012 15:20:06 +0200 Subject: [PATCH] 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 Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qcompilerdetection.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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