Skip to content

Commit 0abe6d6

Browse files
committed
C pointers: delete dead code in ir_num_lit_fits_in_other_type
1 parent 069fc1a commit 0abe6d6

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/ir.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8555,20 +8555,6 @@ static bool ir_num_lit_fits_in_other_type(IrAnalyze *ira, IrInstruction *instruc
85558555
}
85568556
}
85578557
}
8558-
if (other_type->id == ZigTypeIdPointer && other_type->data.pointer.ptr_len == PtrLenC && const_val_is_int) {
8559-
if (!bigint_fits_in_bits(&const_val->data.x_bigint, ira->codegen->pointer_size_bytes * 8, true) &&
8560-
!bigint_fits_in_bits(&const_val->data.x_bigint, ira->codegen->pointer_size_bytes * 8, false))
8561-
{
8562-
Buf *val_buf = buf_alloc();
8563-
bigint_append_buf(val_buf, &const_val->data.x_bigint, 10);
8564-
8565-
ir_add_error(ira, instruction,
8566-
buf_sprintf("integer value %s outside of pointer address range",
8567-
buf_ptr(val_buf)));
8568-
return false;
8569-
}
8570-
return true;
8571-
}
85728558

85738559
const char *num_lit_str;
85748560
Buf *val_buf = buf_alloc();

0 commit comments

Comments
 (0)