diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-22 18:56:41 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-22 18:56:41 +0100 |
| commit | a65eadee63828a681e07d7a99ce154b66c856d1e (patch) | |
| tree | 95bf74c452a45beb737b54f15a620d5cab9b1353 /src/check_expr.cpp | |
| parent | 16dfae62bcdce4d56c4adeaf6229e4d4eb95b329 (diff) | |
Fix for in enum iteration
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 9a146608f..09c2edbb3 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1839,23 +1839,10 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) { // Cast between pointers if (is_type_pointer(src) && is_type_pointer(dst)) { - #if 0 - Type *s = base_type(type_deref(src)); - if (is_type_union(s)) { - // NOTE(bill): Should the error be here?! - // NOTE(bill): This error should suppress the next casting error as it's at the same position - gbString xs = type_to_string(x); - gbString ys = type_to_string(y); - error(operand->expr, "Cannot cast from a union pointer '%s' to '%s', try using 'union_cast' or cast to a 'rawptr'", xs, ys); - gb_string_free(ys); - gb_string_free(xs); - return false; - } - #endif return true; } - // (u)int <-> pointer + // uintptr <-> pointer if (is_type_uintptr(src) && is_type_pointer(dst)) { return true; } |