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 <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-10-02 09:08:45 +02:00
parent 694d300355
commit 590c73bee2

View File

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