authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2016-04-23 00:26:29-07:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2016-04-23 00:26:29-07:00
log4a7911e3eb40e590de930a07413d6254554d2de7
tree0878bb001bb47becb60a9b98ffc3d6adc53d80b4
parent66163692ad35048e0bab5861e371067b63ee0f88

fix gcc build errors


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

src/analyze.cpp+2-4
......@@ -3089,12 +3089,10 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import,
30893089 return resolved_type;
30903090 }
30913091
3092 bool is_int = false;
3093 bool is_float = false;
30943092 if (resolved_type->id == TypeTableEntryIdInt ||
30953093 resolved_type->id == TypeTableEntryIdNumLitInt)
30963094 {
3097 is_int = true;
3095 // int
30983096 } else if ((resolved_type->id == TypeTableEntryIdFloat ||
30993097 resolved_type->id == TypeTableEntryIdNumLitFloat) &&
31003098 (bin_op_type == BinOpTypeAdd ||
......@@ -3103,7 +3101,7 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import,
31033101 bin_op_type == BinOpTypeDiv ||
31043102 bin_op_type == BinOpTypeMod))
31053103 {
3106 is_float = true;
3104 // float
31073105 } else {
31083106 add_node_error(g, node, buf_sprintf("invalid operands to binary expression: '%s' and '%s'",
31093107 buf_ptr(&lhs_type->name), buf_ptr(&rhs_type->name)));
src/eval.cpp+1
......@@ -1124,6 +1124,7 @@ static bool eval_expr(EvalFn *ef, AstNode *node, ConstExprValue *out) {
11241124 case NodeTypeTypeDecl:
11251125 zig_unreachable();
11261126 }
1127 zig_unreachable();
11271128}
11281129
11291130static bool eval_fn_args(EvalFnRoot *efr, FnTableEntry *fn, ConstExprValue *args, ConstExprValue *out_val) {