diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-29 11:17:02 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-29 09:28:03 +0000 |
commit | 99d5cdad6c8580d5ef31c291b721bf6230e2502f (patch) | |
tree | 2642382e8bad8556c66eeb4e1ccf7d9711d771f4 /src/qml/compiler/qv4codegen.cpp | |
parent | c5398fdb30bf07d06c533b980c7d7a08b3a9740d (diff) |
Fix compilation failures on Ubuntu 16.10 (gcc 6.2.0)
Change-Id: Ia70727deb008021cbef6e546816b33ff0ce64afa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index d83764754c..7643212ea1 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1461,8 +1461,7 @@ void Codegen::loadClosure(int closureId) load.value = closureId; bytecodeGenerator->addInstruction(load); } else { - Instruction::LoadUndefined load; - bytecodeGenerator->addInstruction(load); + Reference::fromConst(this, Encode::undefined()).loadInAccumulator(); } } @@ -3092,6 +3091,8 @@ void Codegen::Reference::loadInAccumulator() const case Accumulator: return; case Const: { +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") // the loads below are empty structs. if (constant == Encode::null()) { Instruction::LoadNull load; codegen->bytecodeGenerator->addInstruction(load); @@ -3104,6 +3105,7 @@ void Codegen::Reference::loadInAccumulator() const } else if (constant == Encode::undefined()) { Instruction::LoadUndefined load; codegen->bytecodeGenerator->addInstruction(load); +QT_WARNING_POP } else { Value p = Primitive::fromReturnedValue(constant); if (p.isNumber()) { |