authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-05 16:18:49-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-05 16:18:49-04:00
log4979e606c36fdca886f82b0dd8c0db17374ab8f6
tree0ea4b7daf7c89dd075221648518f06e1694ee02d
parent20eb749ad6983d74ce8285a725d84248d41fca00

fix gcc 5.4.0compile errors


3 files changed, 4 insertions(+), 4 deletions(-)

src/analyze.cpp+1-1
......@@ -6026,7 +6026,7 @@ static TypeTableEntry *analyze_switch_expr(CodeGen *g, ImportTableEntry *import,
60266026
60276027
60286028 int *field_use_counts = nullptr;
6029 HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes;
6029 HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes = {};
60306030 if (expr_type->id == TypeTableEntryIdEnum) {
60316031 field_use_counts = allocate<int>(expr_type->data.enumeration.field_count);
60326032 } else if (expr_type->id == TypeTableEntryIdErrorUnion) {
src/codegen.cpp+2-2
......@@ -2757,7 +2757,7 @@ static LLVMValueRef gen_if_var_expr(CodeGen *g, AstNode *node) {
27572757static LLVMValueRef gen_block(CodeGen *g, AstNode *block_node, TypeTableEntry *implicit_return_type) {
27582758 assert(block_node->type == NodeTypeBlock);
27592759
2760 LLVMValueRef return_value;
2760 LLVMValueRef return_value = nullptr;
27612761 for (int i = 0; i < block_node->data.block.statements.length; i += 1) {
27622762 AstNode *statement_node = block_node->data.block.statements.at(i);
27632763 return_value = gen_expr(g, statement_node);
......@@ -3301,7 +3301,7 @@ static LLVMValueRef gen_var_decl_expr(CodeGen *g, AstNode *node) {
33013301 }
33023302 }
33033303
3304 LLVMValueRef init_val;
3304 LLVMValueRef init_val = nullptr;
33053305 TypeTableEntry *init_val_type;
33063306 return gen_var_decl_raw(g, node, &node->data.variable_declaration, false, &init_val, &init_val_type, false);
33073307}
src/parseh.cpp+1-1
......@@ -1205,7 +1205,7 @@ static void visit_var_decl(Context *c, const VarDecl *var_decl) {
12051205 emit_warning(c, var_decl, "ignoring variable '%s' - unable to evaluate initializer\n", buf_ptr(name));
12061206 return;
12071207 }
1208 AstNode *init_node;
1208 AstNode *init_node = nullptr;
12091209 switch (ap_value->getKind()) {
12101210 case APValue::Int:
12111211 {