diff options
Diffstat (limited to 'src/qml/common/qv4staticvalue_p.h')
-rw-r--r-- | src/qml/common/qv4staticvalue_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/common/qv4staticvalue_p.h b/src/qml/common/qv4staticvalue_p.h index e9c3554104..e887cdc674 100644 --- a/src/qml/common/qv4staticvalue_p.h +++ b/src/qml/common/qv4staticvalue_p.h @@ -393,7 +393,7 @@ struct StaticValue } QV4_NEARLY_ALWAYS_INLINE static bool isInt32(double d) { - int i = int(d); + int i = QJSNumberCoercion::toInteger(d); return (i == d && !(d == 0 && std::signbit(d))); } @@ -589,10 +589,17 @@ struct StaticValue // Has to be aligned to 32 bytes Q_ASSERT(!(tmp & Lower5Mask)); + // MinGW produces a bogus warning about array bounds. + // There is no array access here. + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Warray-bounds") + // Encode the pointer. _val = storePointerBits<Top1Shift, Top1Mask>( storePointerBits<Upper3Shift, Upper3Mask>( storePointerBits<Lower5Shift, Lower5Mask>(tmp))); + + QT_WARNING_POP } #elif QT_POINTER_SIZE == 4 QML_NEARLY_ALWAYS_INLINE HeapBasePtr m() const |