diff options
| author | Josh Wolfe <thejoshwolfe@gmail.com> | 2016-04-23 00:26:29 -0700 |
|---|---|---|
| committer | Josh Wolfe <thejoshwolfe@gmail.com> | 2016-04-23 00:26:29 -0700 |
| commit | 4a7911e3eb40e590de930a07413d6254554d2de7 (patch) | |
| tree | 0878bb001bb47becb60a9b98ffc3d6adc53d80b4 /src/analyze.cpp | |
| parent | 66163692ad35048e0bab5861e371067b63ee0f88 (diff) | |
| download | zig-4a7911e3eb40e590de930a07413d6254554d2de7.tar.gz zig-4a7911e3eb40e590de930a07413d6254554d2de7.zip | |
fix gcc build errors
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index ae1400048e..572fa4df9c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3089,12 +3089,10 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import, return resolved_type; } - bool is_int = false; - bool is_float = false; if (resolved_type->id == TypeTableEntryIdInt || resolved_type->id == TypeTableEntryIdNumLitInt) { - is_int = true; + // int } else if ((resolved_type->id == TypeTableEntryIdFloat || resolved_type->id == TypeTableEntryIdNumLitFloat) && (bin_op_type == BinOpTypeAdd || @@ -3103,7 +3101,7 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import, bin_op_type == BinOpTypeDiv || bin_op_type == BinOpTypeMod)) { - is_float = true; + // float } else { add_node_error(g, node, buf_sprintf("invalid operands to binary expression: '%s' and '%s'", buf_ptr(&lhs_type->name), buf_ptr(&rhs_type->name))); |
