From 590c73bee2083c8dc8635123726e138a26dd3a97 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 2 Oct 2015 09:08:45 +0200 Subject: Add static assert checking QT_POINTER_SIZE. QT_POINTER_SIZE is determined by the configure test ptrsize, which has been observed to fail due to unrelated build issues. Add a check to verify the correct size. Task-number: QTBUG-48525 Change-Id: I4fcb9761b54370b39c0d3e1e0a6d0aa3c0223f40 Reviewed-by: Joerg Bornemann --- src/corelib/global/qglobal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 7da9713e80..02220d0db2 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -120,7 +120,9 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n); // (if this list becomes too long, consider factoring into a separate file) Q_STATIC_ASSERT_X(sizeof(int) == 4, "Qt assumes that int is 32 bits"); Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits"); - +#ifndef QT_BOOTSTRAPPED +Q_STATIC_ASSERT_X(QT_POINTER_SIZE == sizeof(void *), "configure test ptrsize failed to correctly determine QT_POINTER_SIZE"); +#endif /*! \class QFlag -- cgit v1.2.3