diff options
| author | gingerBill <bill@gingerbill.org> | 2017-11-02 22:34:09 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-11-02 22:34:09 +0000 |
| commit | fcc8b89e6b8f2df503ff19abbca67f8cbddf11dc (patch) | |
| tree | 88b0b02b6c2878ae285847ab0173ffdede5a25eb /src | |
| parent | 529d1c78c73a50e33c3953d45258395a136cd7f4 (diff) | |
Fix issue #130; allow conversion from any pointer to `uintptr` and vice versa
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index c22d59da0..1ab7e0df0 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -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; } |