summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-21 11:09:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-21 13:41:01 +0200
commit8133af25031880b7d28e4e9d6124f48fb986b683 (patch)
treed6a792140fdad25bff331d19fdfdf3c00f4753ba /src/corelib/global/qcompilerdetection.h
parentbc7cf82dc17f6825fd9fed7068d2d0cd14719e5b (diff)
Try to work around GCC 4.6's noexcept bugs, again
Commit 7315296e9c94c38c842728aed199ac286a3ef174 blacklisted GCC 4.6.0 and 4.6.1 on the grounds that the bug regarding noexcept was fixed in 4.6.2. However, we have evidence of the issue remaining in 4.6.3, so it looks like it was not the issue that the GCC team fixed. For that reason, declare noexcept support in GCC 4.6 fatally broken and enable it only for 4.7. It has been working fine for a month for me on 4.7.1. Change-Id: Ic5a542235867f20657db12e0e809b83522dc7d23 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 57cba10d6b..43f4439a29 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -628,17 +628,14 @@
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
/* C++11 features supported in GCC 4.6: */
# define Q_COMPILER_CONSTEXPR
-# define Q_COMPILER_NOEXCEPT
# define Q_COMPILER_NULLPTR
# define Q_COMPILER_UNRESTRICTED_UNIONS
# define Q_COMPILER_RANGE_FOR
-# if __GNUC__ == 4 && __GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ < 2
- /* GCC 4.6.0 and 4.6.1 have a problem dealing with noexcept expressions,
- * so turn the feature off for those versions */
-# undef Q_COMPILER_NOEXCEPT
-# endif
# endif
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
+ /* GCC 4.6.x has problems dealing with noexcept expressions,
+ * so turn the feature on for 4.7 and above, only */
+# define Q_COMPILER_NOEXCEPT
/* C++11 features supported in GCC 4.7: */
# define Q_COMPILER_NONSTATIC_MEMBER_INIT
# define Q_COMPILER_DELEGATING_CONSTRUCTORS