diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-19 22:44:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 05:55:25 +0200 |
commit | 3ef88c539ff63d9cb33af71f44653b328f36d0db (patch) | |
tree | 207bd2f78b4d9614bd10f1949d27d9c711786d81 /src/qml/compiler/qv4isel_masm_p.h | |
parent | 8ed38c70fd29680f7981d9d23581d46cf32139d0 (diff) |
Use a handwritten offsetof macro
clang complains about our usage of offsetof(). What we do is not
strictly c++98 compliant, but compliant with c++11. So replace
the default offsetof with a handwritten macro to shut up clang
until we can switch to c++11 mode for all compilers.
Change-Id: Id724adb323ba9724ad5d7d9e0dba5a73b51af24f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm_p.h')
-rw-r--r-- | src/qml/compiler/qv4isel_masm_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h index 5de0e8ce58..af9ca08a4b 100644 --- a/src/qml/compiler/qv4isel_masm_p.h +++ b/src/qml/compiler/qv4isel_masm_p.h @@ -1456,7 +1456,7 @@ private: template <typename Retval, typename Arg1, typename Arg2> void generateLookupCall(Retval retval, uint index, uint getterSetterOffset, Arg1 arg1, Arg2 arg2) { - _as->loadPtr(Assembler::Address(Assembler::ContextRegister, offsetof(QV4::ExecutionContext, lookups)), + _as->loadPtr(Assembler::Address(Assembler::ContextRegister, qOffsetOf(QV4::ExecutionContext, lookups)), Assembler::ReturnValueRegister); Assembler::Pointer lookupAddr(Assembler::ReturnValueRegister, index * sizeof(QV4::Lookup)); |