From e597a8d72eba1241b944fee48c0be4d6203acc4c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 13 May 2018 17:38:35 +0100 Subject: Fix issues with exact integer bounds and remove dead code --- src/check_stmt.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 72c6f5487..54226e565 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -190,7 +190,6 @@ Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) { // NOTE(bill): Ignore assignments to '_' if (is_blank_ident(node)) { - add_entity_definition(&c->info, node, nullptr); check_assignment(c, rhs, nullptr, str_lit("assignment to '_' identifier")); if (rhs->mode == Addressing_Invalid) { return nullptr; @@ -269,8 +268,7 @@ Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) { } i64 imax = 1ll << (cast(i64)lhs_bits-1ll); - bool ok = false; - ok = !(u < 0 || u > umax); + bool ok = !(u < 0 || u > umax); if (ok) { return rhs->type; -- cgit v1.2.3