diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2023-01-24 15:58:38 +0100 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2023-01-24 15:58:38 +0100 |
commit | 2d23ce58cb53a3a9026bc12c79e6c0fa99b5aa30 (patch) | |
tree | 47908ee14fbfa6a490d8df8931b6c3cd4b11c63e /cparser/Lexer.mll | |
parent | 856da72d4190b42a012043a745dddc07a36c60c0 (diff) | |
download | compcert-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/Lexer.mll')
-rw-r--r-- | cparser/Lexer.mll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 2efa4216..95374afe 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -241,7 +241,7 @@ let add_char enc c accu = | Chr x, Cabs.EncU32 -> (* Characters are not encoded *) Int64.of_int x :: accu | Chr x, Cabs.EncWide -> (* Depends on size of wchar_t *) - if Machine.(!config.sizeof_wchar) = 2 + if Cutil.sizeof_ikind (Cutil.wchar_ikind ()) = 2 then add_char_utf16 x accu else Int64.of_int x :: accu } |