From 240b2f1819294cc59b48f88ef3344bf77265fec6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 29 Sep 2025 12:54:52 +0100 Subject: [PATCH] Disable `#raw_union` constants for the time being --- src/llvm_backend_proc.cpp | 6 ------ src/types.cpp | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp index 926401657..7680c5e76 100644 --- a/src/llvm_backend_proc.cpp +++ b/src/llvm_backend_proc.cpp @@ -928,12 +928,6 @@ gb_internal lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue args[i] = LLVMBuildPointerCast(p->builder, args[i], param_type, ""); arg_type = param_type; continue; - } else if (arg_kind == LLVMStructTypeKind) { - if (lb_sizeof(arg_type) == lb_sizeof(param_type)) { - args[i] = LLVMBuildBitCast(p->builder, args[i], param_type, ""); - arg_type = param_type; - continue; - } } } } diff --git a/src/types.cpp b/src/types.cpp index 1fbcd429b..effa8ef64 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -2541,7 +2541,8 @@ gb_internal bool is_type_raw_union_constantable(Type *type) { return false; } } - return true; + // return true; + return false; // Disable raw union constants for the time being }