From 67bc35e882800164c2a7a30cadc237d4051a4b46 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 23 Nov 2020 16:19:26 +0000 Subject: Fix logic for comparisons of struct #raw_union types --- src/types.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/types.cpp') diff --git a/src/types.cpp b/src/types.cpp index b8b4b32f5..0fc529213 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1919,6 +1919,9 @@ bool is_type_comparable(Type *t) { return is_type_comparable(t->Opaque.elem); case Type_Struct: + if (t->Struct.is_raw_union) { + return is_type_simple_compare(t); + } for_array(i, t->Struct.fields) { Entity *f = t->Struct.fields[i]; if (!is_type_comparable(f->type)) { -- cgit v1.2.3