From 26c7bb252038f5fe5d118cae4a1883612bbf3989 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 6 Nov 2012 11:22:16 +0100 Subject: Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for clang. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Thiago Macieira Reviewed-by: Morten Johan Sørvig --- src/corelib/thread/qbasicatomic.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3