diff --git a/src/all_types.hpp b/src/all_types.hpp index 4bd136648..8a805a0b4 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -524,10 +524,11 @@ struct ZigValue { RuntimeHintSlice rh_slice; } data; - // uncomment these to find bugs. can't leave them uncommented because of a gcc-9 warning - //ZigValue(const ZigValue &other) = delete; // plz zero initialize with {} + // uncomment this to find bugs. can't leave it uncommented because of a gcc-9 warning //ZigValue& operator= (const ZigValue &other) = delete; // use copy_const_val + ZigValue(const ZigValue &other) = delete; // plz zero initialize with ZigValue val = {}; + // for use in debuggers void dump(); }; diff --git a/src/ir.cpp b/src/ir.cpp index 8a750e698..2732f4e02 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -17009,7 +17009,7 @@ static IrInstGen *ir_analyze_bit_shift(IrAnalyze *ira, IrInstSrcBinOp *bin_op_in if (op2_val == nullptr) return ira->codegen->invalid_inst_gen; - ZigValue bit_count_value; + ZigValue bit_count_value = {}; init_const_usize(ira->codegen, &bit_count_value, bit_count); if (!value_cmp_numeric_val_all(op2_val, CmpLT, &bit_count_value)) {