From 2db601dc7c8055d2b666b14d57dc6d5d1c7cc077 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 1 Feb 2023 15:03:51 +0100 Subject: wchar_t is unsigned int for arm_littleendian, arm_bigendian and aarch64 However, it is signed int for aarch64_apple. Fixes: #475 --- cparser/Machine.ml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cparser/Machine.ml b/cparser/Machine.ml index 81511ac3..3805b252 100644 --- a/cparser/Machine.ml +++ b/cparser/Machine.ml @@ -219,7 +219,9 @@ let ppc_32_r64_linux_bigendian = { ppc_32_linux_bigendian with sizeof_intreg = 8;} let arm_littleendian = - { ilp32ll64 with name = "arm"; struct_passing_style = SP_split_args; + { ilp32ll64 with name = "arm"; + wchar_ikind = C.IUInt; + struct_passing_style = SP_split_args; struct_return_style = SR_int1to4;} let arm_bigendian = @@ -237,11 +239,14 @@ let rv64 = let aarch64 = { i32lpll64 with name = "aarch64"; + wchar_ikind = C.IUInt; struct_passing_style = SP_ref_callee; (* Wrong *) struct_return_style = SR_ref } (* Wrong *) let aarch64_apple = - { aarch64 with char_signed = true } + { aarch64 with char_signed = true; + wchar_ikind = C.IInt;} +(*- #End *) (* Add GCC extensions re: sizeof and alignof *) -- cgit