Fix issue #130; allow conversion from any pointer to uintptr and vice versa

This commit is contained in:
gingerBill committed 2017-11-02 22:34:09 +00:00
1 parent 529d1c78c7
commit fcc8b89e6b
2 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -1759,11 +1759,11 @@ bool check_is_castable_to(Checker *c, Operand *operand, Type *y) {
return true;
}
// (u)int <-> rawptr
if (is_type_uintptr(src) && is_type_rawptr(dst)) {
// (u)int <-> pointer
if (is_type_uintptr(src) && is_type_pointer(dst)) {
return true;
}
if (is_type_rawptr(src) && is_type_uintptr(dst)) {
if (is_type_pointer(src) && is_type_uintptr(dst)) {
return true;
}