From 718b076e502c962e54436b89729fd74b52e7da36 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 22 Mar 2022 15:41:25 +0800 Subject: [PATCH] irrt: use __builtin_alloca --- nac3core/build.rs | 1 - nac3core/src/codegen/irrt/irrt.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nac3core/build.rs b/nac3core/build.rs index 77ba9fa1..2c36a3db 100644 --- a/nac3core/build.rs +++ b/nac3core/build.rs @@ -26,7 +26,6 @@ fn main() { "-S", "-Wall", "-Wextra", - "-Wno-implicit-function-declaration", "-o", "-", ]; diff --git a/nac3core/src/codegen/irrt/irrt.c b/nac3core/src/codegen/irrt/irrt.c index 4c091437..ba250dc9 100644 --- a/nac3core/src/codegen/irrt/irrt.c +++ b/nac3core/src/codegen/irrt/irrt.c @@ -104,7 +104,7 @@ int32_t __nac3_list_slice_assign_var_size( || MAX(src_start, src_end) < MIN(dest_start, dest_end) ); if (need_alloca) { - uint8_t *tmp = alloca(src_arr_len * size); + uint8_t *tmp = __builtin_alloca(src_arr_len * size); __builtin_memcpy(tmp, src_arr, src_arr_len * size); src_arr = tmp; }