aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-12 00:39:08 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-12 00:39:08 -0500
commit0abe6d668eb52aefa59c75a8d8f782f2372f8600 (patch)
tree8e32164bd86d7e6764f90027de2c95d438b959a0 /src
parent069fc1a26990b3946cf788b4ebe5edefca5a3bfd (diff)
downloadzig-0abe6d668eb52aefa59c75a8d8f782f2372f8600.tar.gz
zig-0abe6d668eb52aefa59c75a8d8f782f2372f8600.zip
C pointers: delete dead code in ir_num_lit_fits_in_other_type
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 91c8503234..1f0edc910d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -8555,20 +8555,6 @@ static bool ir_num_lit_fits_in_other_type(IrAnalyze *ira, IrInstruction *instruc
}
}
}
- if (other_type->id == ZigTypeIdPointer && other_type->data.pointer.ptr_len == PtrLenC && const_val_is_int) {
- if (!bigint_fits_in_bits(&const_val->data.x_bigint, ira->codegen->pointer_size_bytes * 8, true) &&
- !bigint_fits_in_bits(&const_val->data.x_bigint, ira->codegen->pointer_size_bytes * 8, false))
- {
- Buf *val_buf = buf_alloc();
- bigint_append_buf(val_buf, &const_val->data.x_bigint, 10);
-
- ir_add_error(ira, instruction,
- buf_sprintf("integer value %s outside of pointer address range",
- buf_ptr(val_buf)));
- return false;
- }
- return true;
- }
const char *num_lit_str;
Buf *val_buf = buf_alloc();