Try to work around GCC 4.6's noexcept bugs, again

Commit 7315296e9c 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>
bb10
Thiago Macieira 2012-08-21 11:09:44 +02:00 committed by Qt by Nokia
parent bc7cf82dc1
commit 8133af2503
1 changed files with 3 additions and 6 deletions

View File

@ -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