diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-11-06 11:22:16 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-07 10:27:04 +0100 |
commit | 26c7bb252038f5fe5d118cae4a1883612bbf3989 (patch) | |
tree | 31b2aea281a1a9fc26d67623f019b2379df9154d | |
parent | dde3f6a934ae26c8e92b0132b1bb85c0aa841ac1 (diff) |
Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for clang.
This triggers a bug in clang (before version 3.2). See also the bug
report: http://llvm.org/bugs/show_bug.cgi?id=12670 .
Change-Id: I9e0bc1cc39059ffa5e062652b932bc01e453ef98
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r-- | src/corelib/thread/qbasicatomic.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 6072212350..4177ddbd39 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -117,7 +117,18 @@ QT_END_HEADER // New atomics #if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS) -# define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS +# if defined(Q_CC_CLANG) && ((((__clang_major__ * 100) + __clang_minor__) < 302) \ + || defined(__apple_build_version__) \ + ) + /* Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for "stock" clang before version 3.2. + Apple's version has different (higher!) version numbers, so disable it for all of them for now. + (The only way to distinguish between them seems to be a check for __apple_build_version__ .) + + For details about the bug: see http://llvm.org/bugs/show_bug.cgi?id=12670 + */ +# else +# define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS +# endif #endif template <typename T> |