diff --git a/resources/lib/std/math.c3 b/resources/lib/std/math.c3 index 05cf358fe..9c1ee82ec 100644 --- a/resources/lib/std/math.c3 +++ b/resources/lib/std/math.c3 @@ -20,7 +20,7 @@ func double log10(double x) const double LG6 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */ const double LG7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ DoubleLong u = { .f = x }; - uint hx = (uint)(u.i >> 32); + ulong hx = (uint)(u.i >> 32); int k = 0; if (hx < 0x00100000 || hx >> 31) { diff --git a/resources/lib/std/mem.c3 b/resources/lib/std/mem.c3 index d58f6999d..a0bbc8f7d 100644 --- a/resources/lib/std/mem.c3 +++ b/resources/lib/std/mem.c3 @@ -11,7 +11,6 @@ enum AllocationKind REALLOC, FREE, } - enum AllocationFailureKind { OUT_OF_MEMORY diff --git a/src/compiler/llvm_codegen_function.c b/src/compiler/llvm_codegen_function.c index 09f2e191a..fb05022d2 100644 --- a/src/compiler/llvm_codegen_function.c +++ b/src/compiler/llvm_codegen_function.c @@ -502,6 +502,8 @@ static void llvm_emit_param_attributes(GenContext *context, LLVMValueRef functio } if (is_return) { + llvm_attribute_add_int(context, function, attribute_align, type_abi_alignment(type_voidptr), 1); + // TODO then type attributes are added to LLVM-C, use that for sret. llvm_attribute_add(context, function, attribute_sret, 1); } else