aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-05-13 17:38:35 +0100
committergingerBill <bill@gingerbill.org>2018-05-13 17:38:35 +0100
commite597a8d72eba1241b944fee48c0be4d6203acc4c (patch)
tree0e473696a04bed8cb7cde5a184016d13afbcae65 /src/check_stmt.cpp
parentde9a4b516465201c8803ae2a2181c9532be65339 (diff)
Fix issues with exact integer bounds and remove dead code
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp4
1 files changed, 1 insertions, 3 deletions
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;