aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cutil.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2023-01-24 15:58:38 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2023-01-24 15:58:38 +0100
commit2d23ce58cb53a3a9026bc12c79e6c0fa99b5aa30 (patch)
tree47908ee14fbfa6a490d8df8931b6c3cd4b11c63e /cparser/Cutil.ml
parent856da72d4190b42a012043a745dddc07a36c60c0 (diff)
downloadcompcert-2d23ce58cb53a3a9026bc12c79e6c0fa99b5aa30.tar.gz
compcert-2d23ce58cb53a3a9026bc12c79e6c0fa99b5aa30.zip
Introduce `wchar_ikind` in machine descriptions
This replaces `sizeof_wchar` and `wchar_signed`, and makes it possible to request that `wchar_t` is `long` instead of `int`, something that seems needed for PowerPC.
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r--cparser/Cutil.ml5
1 files changed, 1 insertions, 4 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml
index f226d51b..5b099d7f 100644
--- a/cparser/Cutil.ml
+++ b/cparser/Cutil.ml
@@ -1008,10 +1008,7 @@ let find_matching_signed_ikind sz =
else if sz = !config.sizeof_longlong then ILongLong
else assert false
-let wchar_ikind () =
- if !config.wchar_signed
- then find_matching_signed_ikind !config.sizeof_wchar
- else find_matching_unsigned_ikind !config.sizeof_wchar
+let wchar_ikind () = !config.wchar_ikind
let size_t_ikind () = find_matching_unsigned_ikind !config.sizeof_size_t
let ptr_t_ikind () = find_matching_unsigned_ikind !config.sizeof_ptr
let ptrdiff_t_ikind () = find_matching_signed_ikind !config.sizeof_ptrdiff_t