aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-11-23 16:19:26 +0000
committergingerBill <bill@gingerbill.org>2020-11-23 16:19:26 +0000
commit67bc35e882800164c2a7a30cadc237d4051a4b46 (patch)
tree29d3b522b30de8188b3738a14fd1038d8caa211b /src/types.cpp
parent4e370e6ed8d6cfe3dee306dfbc298ba68722f12e (diff)
Fix logic for comparisons of struct #raw_union types
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp3
1 files changed, 3 insertions, 0 deletions
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)) {