From a65eadee63828a681e07d7a99ce154b66c856d1e Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 22 Aug 2018 18:56:41 +0100 Subject: Fix for in enum iteration --- src/check_expr.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/check_expr.cpp') 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; } -- cgit v1.2.3