Skip to content

Commit

Permalink
wchar_t is unsigned int for arm_littleendian, arm_bigendian and aarch64
Browse files Browse the repository at this point in the history
However, it is signed int for aarch64_apple.

Fixes: AbsInt#475
  • Loading branch information
bschommer authored and xavierleroy committed Feb 1, 2023
1 parent 14dde0a commit 2db601d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cparser/Machine.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 *)

Expand Down

0 comments on commit 2db601d

Please sign in to comment.